Updated render to remove comments from text
This commit is contained in:
parent
e4d2118d4b
commit
0475591fb6
|
@ -95,7 +95,7 @@ mermaid.initialize(config);
|
|||
|
||||
#### Defined in
|
||||
|
||||
[mermaidAPI.ts:659](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L659)
|
||||
[mermaidAPI.ts:661](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L661)
|
||||
|
||||
## Functions
|
||||
|
||||
|
|
|
@ -399,6 +399,8 @@ const render = async function (
|
|||
// clean up text CRLFs
|
||||
text = text.replace(/\r\n?/g, '\n'); // parser problems on CRLF ignore all CR and leave LF;;
|
||||
|
||||
text = text.replace(/\s*%%.*\n/gm, '\n'); // remove comments from text to avoid issues with parser
|
||||
|
||||
const idSelector = '#' + id;
|
||||
const iFrameID = 'i' + id;
|
||||
const iFrameID_selector = '#' + iFrameID;
|
||||
|
|
Loading…
Reference in New Issue