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:
abzicht
2019-03-10 11:49:16 +01:00
parent 91651ca6ce
commit 6c84544521

View File

@@ -20,9 +20,9 @@
\#[^\n]* /* skip comments */
\%%[^\n]* /* skip comments */
"href"[\s]+ this.begin("href"); /* return the next word after 'href' */
<href>[\s\n] 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"[\s]+["] this.begin("href"); /* return the next double quoted word after 'href' */
<href>["] this.popState(); /* e.g. return https://example.com for 'href "https://example.com"' */
<href>[^"]* return 'href';
"call"[\s]+ this.begin("callbackname");
<callbackname>\( this.popState(); this.begin("callbackargs");