fix: prevent zero length tokens in raw-blocks (#1577)
This comment ensures that the lexer is not stuck on zero-length tokens, in raw-blocks like {{{{a}}}} {{{{/a}}}}
This commit is contained in:
+1
-1
@@ -63,7 +63,7 @@ ID [^\s!"#%-,\.\/;->@\[-\^`\{-~]+/{LOOKAHEAD}
|
||||
return 'END_RAW_BLOCK';
|
||||
}
|
||||
}
|
||||
<raw>[^\x00]*?/("{{{{") { return 'CONTENT'; }
|
||||
<raw>[^\x00]+/("{{{{") { return 'CONTENT'; }
|
||||
|
||||
<com>[\s\S]*?"--"{RIGHT_STRIP}?"}}" {
|
||||
this.popState();
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ content
|
||||
};
|
||||
|
||||
rawBlock
|
||||
: openRawBlock content+ END_RAW_BLOCK -> yy.prepareRawBlock($1, $2, $3, @$)
|
||||
: openRawBlock content* END_RAW_BLOCK -> yy.prepareRawBlock($1, $2, $3, @$)
|
||||
;
|
||||
|
||||
openRawBlock
|
||||
|
||||
Reference in New Issue
Block a user