Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

li:nth-last-child(-n+3) parse error #28

Closed
noyobo opened this issue Jun 25, 2023 · 1 comment
Closed

li:nth-last-child(-n+3) parse error #28

noyobo opened this issue Jun 25, 2023 · 1 comment

Comments

@noyobo
Copy link

noyobo commented Jun 25, 2023

import {createParser} from 'css-selector-parser';

const parse = createParser();
const parsed = parse('li:nth-last-child(-n+3)');
// https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-last-child
 ParserError: css-selector-parser parse error: Formula parse error. Pos: 19.

       5 |   it('case', function () {
       6 |     const parser = createParser({
    >  7 |       syntax: 'progressive',
         |                    ^
       8 |     });
       9 |     const parsed = parser('li:nth-last-child(-n+3)');

      at fail (node_modules/.pnpm/css-selector-parser@2.2.2/node_modules/css-selector-parser/lib/parser.js:94:21)
      at assert (node_modules/.pnpm/css-selector-parser@2.2.2/node_modules/css-selector-parser/lib/parser.js:101:20)
      at parseNumber (node_modules/.pnpm/css-selector-parser@2.2.2/node_modules/css-selector-parser/lib/parser.js:350:
@mdevils
Copy link
Owner

mdevils commented Jun 25, 2023

@noyobo Thanks for reporting! Fixed in 2.3.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants