From 6c8454452134735a87b8e5e05b68090d0e76aa27 Mon Sep 17 00:00:00 2001 From: abzicht Date: Sun, 10 Mar 2019 11:49:16 +0100 Subject: [PATCH] Changed href to scan for the next double quoted word. This allows whitespace in links and resolves the issue with href ending with EOF --- src/diagrams/gantt/parser/gantt.jison | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/diagrams/gantt/parser/gantt.jison b/src/diagrams/gantt/parser/gantt.jison index 856148371..358f157da 100644 --- a/src/diagrams/gantt/parser/gantt.jison +++ b/src/diagrams/gantt/parser/gantt.jison @@ -20,9 +20,9 @@ \#[^\n]* /* skip comments */ \%%[^\n]* /* skip comments */ -"href"[\s]+ this.begin("href"); /* return the next word after 'href' */ -[\s\n] this.popState(); /* e.g. return https://example.com for 'href https://example.com' */ -[^\s\n]* return 'href'; /* the specified word must not contain whitespace */ +"href"[\s]+["] this.begin("href"); /* return the next double quoted word after 'href' */ +["] this.popState(); /* e.g. return https://example.com for 'href "https://example.com"' */ +[^"]* return 'href'; "call"[\s]+ this.begin("callbackname"); \( this.popState(); this.begin("callbackargs");