Skip to content
This repository has been archived by the owner on Jan 22, 2023. It is now read-only.

Commit

Permalink
Fix inefficient regular expression
Browse files Browse the repository at this point in the history
  • Loading branch information
lauriro committed Dec 31, 2022
1 parent 237c2fb commit 63ba612
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Expand Up @@ -11,9 +11,9 @@

!function(exports) {
var undef
, selectorRe = /([.#:[])([-\w]+)(?:\((.+?)\)|([~^$*|]?)=(("|')(?:\\\6|.)*?\6|[-\w]+))?]?/g
, selectorLastRe = /([\s>+~]*)(?:("|')(?:\\\2|.)*?\2|\(.+?\)|~=|[^\s>+~])+$/
, selectorSplitRe = /\s*,\s*(?=(?:[^'"()]|"(?:\\"|.)*?"|'(?:\\'|.)*?'|\(.+?\))+$)/
, selectorRe = /([.#:[])([-\w]+)(?:\((.+?)\)|([~^$*|]?)=(("|')(?:\\.|[^\\])*?\6|[-\w]+))?]?/g
, selectorLastRe = /([\s>+~]*)(?:("|')(?:\\.|[^\\])*?\2|\(.+?\)|~=|[^\s>+~])+$/
, selectorSplitRe = /\s*,\s*(?=(?:[^'"()]|"(?:\\.|[^\\])*?"|'(?:\\.|[^\\])*?'|\(.+?\))+$)/
, selectorCache = {
"": function() {}
}
Expand Down

0 comments on commit 63ba612

Please sign in to comment.