Skip to content

Commit

Permalink
Always add a ) when using pseudofunctions
Browse files Browse the repository at this point in the history
  • Loading branch information
janlent1 committed Apr 1, 2023
1 parent 4a41029 commit d511c9f
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions lib/css/CssParser.js
Expand Up @@ -139,18 +139,6 @@ class CssParser extends Parser {
let lastIdentifier = undefined;
const modeStack = [];
let awaitRightParenthesis = false;
const pseudoFunctionNames = [
":matches",
":not",
":is",
":where",
":has",
":current",
":past",
":future",
"-moz-any",
"-webkit-any"
];
const isTopLevelLocal = () =>
modeData === "local" ||
(this.defaultMode === "local" && modeData === undefined);
Expand Down Expand Up @@ -576,10 +564,8 @@ class CssParser extends Parser {
modeData = "local";
const dep = new ConstDependency("", [start, end]);
module.addPresentationalDependency(dep);
} else if (pseudoFunctionNames.includes(name)) {
awaitRightParenthesis = true;
modeStack.push(false);
} else {
awaitRightParenthesis = true;
modeStack.push(false);
}
break;
Expand Down

0 comments on commit d511c9f

Please sign in to comment.