mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-26 02:39:41 +02:00
Changed href to scan for the next double quoted word. This allows whitespace in links and resolves the issue with href ending with EOF
This commit is contained in:
@@ -20,9 +20,9 @@
|
|||||||
\#[^\n]* /* skip comments */
|
\#[^\n]* /* skip comments */
|
||||||
\%%[^\n]* /* skip comments */
|
\%%[^\n]* /* skip comments */
|
||||||
|
|
||||||
"href"[\s]+ this.begin("href"); /* return the next word after 'href' */
|
"href"[\s]+["] this.begin("href"); /* return the next double quoted word after 'href' */
|
||||||
<href>[\s\n] this.popState(); /* e.g. return https://example.com for 'href https://example.com' */
|
<href>["] this.popState(); /* e.g. return https://example.com for 'href "https://example.com"' */
|
||||||
<href>[^\s\n]* return 'href'; /* the specified word must not contain whitespace */
|
<href>[^"]* return 'href';
|
||||||
|
|
||||||
"call"[\s]+ this.begin("callbackname");
|
"call"[\s]+ this.begin("callbackname");
|
||||||
<callbackname>\( this.popState(); this.begin("callbackargs");
|
<callbackname>\( this.popState(); this.begin("callbackargs");
|
||||||
|
Reference in New Issue
Block a user