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

CSS: percent symbol in translateX(-50%) highlights as error #2574

Closed
Akuli opened this issue Nov 8, 2023 · 1 comment
Closed

CSS: percent symbol in translateX(-50%) highlights as error #2574

Akuli opened this issue Nov 8, 2023 · 1 comment

Comments

@Akuli
Copy link
Contributor

Akuli commented Nov 8, 2023

2023-11-08-215144_615x351_scrot

Minimal reproducer: (output contains (Token.Error, '%'), but it IMO shouldn't)

>>> import pygments
>>> from pygments.lexers import CssLexer
>>> import pprint
>>> pprint.pprint(list(pygments.lex('foo { transform: translateX(-50%); }', CssLexer())))
[(Token.Name.Tag, 'foo'),
 (Token.Text.Whitespace, ' '),
 (Token.Punctuation, '{'),
 (Token.Text.Whitespace, ' '),
 (Token.Keyword, 'transform'),
 (Token.Punctuation, ':'),
 (Token.Text.Whitespace, ' '),
 (Token.Name.Builtin, 'translateX'),
 (Token.Punctuation, '('),
 (Token.Name.Variable, '-50'),
 (Token.Error, '%'),
 (Token.Punctuation, ')'),
 (Token.Punctuation, ';'),
 (Token.Text.Whitespace, ' '),
 (Token.Punctuation, '}'),
 (Token.Text.Whitespace, '\n')]
>>> 
@birkenfeld
Copy link
Member

What version are you using? This was fixed in #2383.

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