| … | … | @@ -0,0 +1,128 @@ | |
| 42 | + | const [, fence = "", info = ""] = match; | |
| 43 | + | if (open === null) { | |
| 44 | + | // Backtick fences cannot have backticks in their info string. | |
| 45 | + | if (!(fence[0] === "`" && info.includes("`"))) { | |
🟠 High lib/mermaidMarkdown.ts:45
A fence inside raw HTML can leave open set until the later Mermaid fence closes it, so the valid diagram is returned as Markdown instead of a Mermaid segment. The scanner opens fences before checking codeOffsets; only open fences whose start offset is a parsed Mermaid code node.
No longer relevant as of 6c820c5c40948e85d26f7a720e086889961ee2b1