File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1520,18 +1520,20 @@ export class AstFilterParser {
15201520
15211521 indexOfNetAnchor ( s ) {
15221522 const end = s . length ;
1523- if ( end === 0 ) { return end ; }
1523+ if ( end === 0 ) { return 0 ; }
15241524 let j = s . lastIndexOf ( '$' ) ;
15251525 if ( j === - 1 ) { return end ; }
1526- if ( ( j + 1 ) === end ) { return end ; }
1526+ let htmlFilteringRule = false ;
15271527 for ( ; ; ) {
1528- const before = s . charAt ( j - 1 ) ;
1529- if ( before === '$' ) { return - 1 ; }
1528+ if ( s . charCodeAt ( j - 1 ) === 0x24 /* $ */ ) {
1529+ htmlFilteringRule = true ;
1530+ }
15301531 if ( this . reNetOptionTokens . test ( s . slice ( j + 1 ) ) ) { return j ; }
15311532 if ( j === 0 ) { break ; }
15321533 j = s . lastIndexOf ( '$' , j - 1 ) ;
15331534 if ( j === - 1 ) { break ; }
15341535 }
1536+ if ( htmlFilteringRule ) { return - 1 ; }
15351537 return end ;
15361538 }
15371539
You can’t perform that action at this time.
0 commit comments