File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -384,12 +384,6 @@ function readNumber(stream: StringStream, firstChar: string) {
384384 return ;
385385 }
386386
387- if ( firstChar === "0" && next && / [ b B ] / . test ( next ) ) {
388- stream . next ( ) ;
389- stream . eatWhile ( / [ 0 1 _ ] / ) ;
390- return ;
391- }
392-
393387 stream . eatWhile ( / [ \d _ ] / ) ;
394388
395389 if ( stream . peek ( ) === "." && stream . string . charAt ( stream . pos + 1 ) !== "." ) {
@@ -554,11 +548,13 @@ const normal: Tokenizer = (stream, state) => {
554548 return "comment" ;
555549 }
556550 if ( stream . eat ( "[" ) ) {
551+ const longBracketStart = stream . pos ;
557552 const level = readLongBracket ( stream ) ;
558553 if ( level >= 0 ) {
559554 pushTokenizer ( state , bracketed ( level , "comment" ) ) ;
560555 return state . cur ( stream , state ) ;
561556 }
557+ stream . backUp ( stream . pos - longBracketStart ) ;
562558 }
563559 stream . skipToEnd ( ) ;
564560 return "comment" ;
@@ -575,11 +571,13 @@ const normal: Tokenizer = (stream, state) => {
575571 }
576572
577573 if ( char === "[" ) {
574+ const longBracketStart = stream . pos ;
578575 const level = readLongBracket ( stream ) ;
579576 if ( level >= 0 ) {
580577 pushTokenizer ( state , bracketed ( level , "string" ) ) ;
581578 return state . cur ( stream , state ) ;
582579 }
580+ stream . backUp ( stream . pos - longBracketStart ) ;
583581 }
584582
585583 if ( char === "@" && isWordStart ( stream . peek ( ) || "" ) ) {
You can’t perform that action at this time.
0 commit comments