You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ParseError with :is() or :matches() containing :has() #4278
Hey @SuperPat45! I'm here to help you with any bugs, questions, or contributions you have while waiting for a human maintainer. Let's tackle this issue together!
To resolve the ParseError "Missing closing ')'" when using :is() or :matches() containing :has() in the given CSS code with less version 4.2.0 on Windows, you need to ensure that the Less parser correctly handles nested parentheses. The provided chunker.js code is responsible for parsing the input and tracking parentheses levels.
The error occurs because the parser does not correctly handle the nested structure of :is() or :matches() containing :has(). To fix this, you need to modify the parser to correctly track and match nested parentheses.
Ensure that the parenLevel is correctly incremented and decremented for each opening and closing parenthesis. This will help the parser to correctly match nested parentheses and avoid the "Missing closing ')'" error [1].
Activity
dosubot commentedon Aug 28, 2024
Hey @SuperPat45! I'm here to help you with any bugs, questions, or contributions you have while waiting for a human maintainer. Let's tackle this issue together!
To resolve the ParseError "Missing closing ')'" when using
:is()or:matches()containing:has()in the given CSS code withlessversion 4.2.0 on Windows, you need to ensure that the Less parser correctly handles nested parentheses. The providedchunker.jscode is responsible for parsing the input and tracking parentheses levels.The error occurs because the parser does not correctly handle the nested structure of
:is()or:matches()containing:has(). To fix this, you need to modify the parser to correctly track and match nested parentheses.Here is the corrected CSS code:
And here is the relevant part of the
chunker.jscode that needs to be modified to handle nested parentheses correctly:Ensure that the
parenLevelis correctly incremented and decremented for each opening and closing parenthesis. This will help the parser to correctly match nested parentheses and avoid the "Missing closing ')'" error [1].To continue talking to Dosu, mention @dosu.
matthew-dean commentedon Aug 28, 2024
Related to: #4268
puckowski commentedon Nov 26, 2024
I submitted a PR #4290
The following Less
becomes: