From c34fd152d569c64d9148f68d2b061e99db92d80c Mon Sep 17 00:00:00 2001 From: yari-dewalt Date: Tue, 29 Oct 2024 11:57:22 -0700 Subject: [PATCH] Add handling for ' characters in non-html text so they don't get sanitized into html code values --- packages/mermaid/src/rendering-util/handle-markdown-text.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/mermaid/src/rendering-util/handle-markdown-text.ts b/packages/mermaid/src/rendering-util/handle-markdown-text.ts index 1bff5a9776..f898875cf0 100644 --- a/packages/mermaid/src/rendering-util/handle-markdown-text.ts +++ b/packages/mermaid/src/rendering-util/handle-markdown-text.ts @@ -39,6 +39,7 @@ export function markdownToLines(markdown: string, config: MermaidConfig = {}): M lines.push([]); } textLine.split(' ').forEach((word) => { + word = word.replace(/'/g, `'`); if (word) { lines[currentLine].push({ content: word, type: parentType }); }