File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -898,7 +898,14 @@ ${genHintItemHTML(item)}
898
898
this . lastIndex = - 1 ;
899
899
this . splitChar = "" ;
900
900
extend . forEach ( ( item ) => {
901
- const currentLastIndex = currentLineValue . lastIndexOf ( item . key ) ;
901
+ let currentLastIndex = currentLineValue . lastIndexOf ( item . key ) ;
902
+ // https://ld246.com/article/1701670704754
903
+ if ( Constants . BLOCK_HINT_KEYS . includes ( item . key ) && currentLastIndex > - 1 ) {
904
+ const thirdLastIndex = currentLineValue . lastIndexOf ( item . key + item . key . substring ( 0 , 1 ) )
905
+ if ( thirdLastIndex > - 1 ) {
906
+ currentLastIndex = Math . min ( currentLastIndex , currentLineValue . lastIndexOf ( item . key + item . key . substring ( 0 , 1 ) ) )
907
+ }
908
+ }
902
909
if ( this . lastIndex < currentLastIndex ) {
903
910
if ( Constants . BLOCK_HINT_KEYS . includes ( this . splitChar ) &&
904
911
( item . key === ":" || item . key === "#" || item . key === "/" || item . key === "、" ) ) {
You can’t perform that action at this time.
0 commit comments