File tree Expand file tree Collapse file tree 2 files changed +15
-14
lines changed
Expand file tree Collapse file tree 2 files changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -895,7 +895,7 @@ export const tests: [
895895 action : AttributeAction . Exists ,
896896 name : "bar" ,
897897 type : SelectorType . Attribute ,
898- namespace : "" ,
898+ namespace : null ,
899899 value : "" ,
900900 ignoreCase : IgnoreCaseMode . Unknown ,
901901 } ,
Original file line number Diff line number Diff line change @@ -297,25 +297,26 @@ function parseSelector(
297297
298298 // Determine attribute name and namespace
299299
300+ let name : string ;
300301 let namespace : string | null = null ;
301302
302303 if ( selector . charCodeAt ( selectorIndex ) === CharCode . Pipe ) {
303- namespace = "" ;
304- selectorIndex += 1 ;
304+ // Equivalent to no namespace
305+ name = getName ( 1 ) ;
305306 } else if ( selector . startsWith ( "*|" , selectorIndex ) ) {
306307 namespace = "*" ;
307- selectorIndex += 2 ;
308- }
309-
310- let name = getName ( 0 ) ;
308+ name = getName ( 2 ) ;
309+ } else {
310+ name = getName ( 0 ) ;
311311
312- if (
313- namespace === null &&
314- selector . charCodeAt ( selectorIndex ) === CharCode . Pipe &&
315- selector . charCodeAt ( selectorIndex + 1 ) !== CharCode . Equal
316- ) {
317- namespace = name ;
318- name = getName ( 1 ) ;
312+ if (
313+ selector . charCodeAt ( selectorIndex ) === CharCode . Pipe &&
314+ selector . charCodeAt ( selectorIndex + 1 ) !==
315+ CharCode . Equal
316+ ) {
317+ namespace = name ;
318+ name = getName ( 1 ) ;
319+ }
319320 }
320321
321322 stripWhitespace ( 0 ) ;
You can’t perform that action at this time.
0 commit comments