File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
platform/mv3/extension/js Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -484,7 +484,7 @@ class Editor {
484
484
}
485
485
486
486
gutterClick ( view , info ) {
487
- const reSeparator = / ^ - - - \s * / ;
487
+ const reSeparator = / ^ (?: - - - | # - - - ) \s * / ;
488
488
const { doc } = view . state ;
489
489
const lineFirst = doc . lineAt ( info . from ) ;
490
490
if ( lineFirst . text === '' ) { return false ; }
@@ -547,17 +547,18 @@ class Editor {
547
547
return { scope : 0 } ;
548
548
} ,
549
549
token : ( stream , state ) => {
550
+ if ( stream . sol ( ) ) {
551
+ if ( stream . match ( / ^ - - - \s * $ / ) ) { return 'meta' ; }
552
+ if ( stream . match ( / ^ # - - - \s * $ / ) ) { return 'meta comment' ; }
553
+ if ( stream . match ( / \. \. \. \s * $ / ) ) { return 'meta' ; }
554
+ }
550
555
const c = stream . peek ( ) ;
551
556
if ( c === '#' ) {
552
557
if ( ( stream . pos === 0 || / \s / . test ( stream . string . charAt ( stream . pos - 1 ) ) ) ) {
553
558
stream . skipToEnd ( ) ;
554
559
return 'comment' ;
555
560
}
556
561
}
557
- if ( stream . sol ( ) ) {
558
- if ( stream . match ( / - - - \s * $ / ) ) { return 'meta' ; }
559
- if ( stream . match ( / \. \. \. \s * $ / ) ) { return 'meta' ; }
560
- }
561
562
if ( stream . eatSpace ( ) ) {
562
563
return null ;
563
564
}
You can’t perform that action at this time.
0 commit comments