Skip to content

Commit

Permalink
more fixes to namespace regular expression
Browse files Browse the repository at this point in the history
  • Loading branch information
dperini committed May 10, 2024
1 parent 34c2154 commit 3dba92a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nwsapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
STD = {
combinator: RegExp('\\s?([>+~])\\s?', 'g'),
apimethods: RegExp('^(?:[a-z]+|\\*)\\|', 'i'),
namespaces: RegExp('^(?:[*][a-z]*)(?:[|][-a-z]+)', 'i')
namespaces: RegExp('^(?:[*|][_a-zA-Z0-9-]*)+', 'g')
},

GROUPS = {
Expand Down Expand Up @@ -658,7 +658,7 @@
'(?:' + pseudoparms + '?)?|' +
// universal * &
// namespace *|*
'(?:[*|][_a-zA-Z0-9-]+)|' +
'(?:[*|]|[_a-zA-Z0-9-]+)|' +
'(?:' +
'(?::' + pseudonames +
'(?:\\x28' + pseudoparms + '?(?:\\x29|$))?|' +
Expand All @@ -677,7 +677,7 @@
'(?:' +
// universal * &
// namespace *|*
'(?:[*|]|[a-zA-Z0-9-]+)|' +
'(?:[*|]|[_a-zA-Z0-9-]+)|' +
'(?:[.#]?' + identifier + ')+|' +
'(?:' + attributes + ')+|' +
'(?:::?' + pseudonames + pseudoclass + ')|' +
Expand Down

0 comments on commit 3dba92a

Please sign in to comment.