diff --git a/packages/mermaid/src/rendering-util/handle-markdown-text.ts b/packages/mermaid/src/rendering-util/handle-markdown-text.ts index 160be86da..572b28c99 100644 --- a/packages/mermaid/src/rendering-util/handle-markdown-text.ts +++ b/packages/mermaid/src/rendering-util/handle-markdown-text.ts @@ -9,10 +9,16 @@ import { getConfig } from '../config.js'; * @returns processed markdown */ function preprocessMarkdown(markdown: string): string { + const markdownAutoWrap = getConfig().markdownAutoWrap; // Replace multiple newlines with a single newline const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, '\n'); // Remove extra spaces at the beginning of each line const withoutExtraSpaces = dedent(withoutMultipleNewlines); + /* + if (markdownAutoWrap === false) { + return withoutExtraSpaces.replace(/ /g, ' '); + } + */ return withoutExtraSpaces; }