Issue #751 resolved

CssLexer treats Opera prefix (-o-) as Operator Error Operator

miketaylr
created an issue

Simple test: http://pygments.org/demo/38139/

Single-letter prefixes are treated as errors, but double ones are OK:

https://github.com/pepelsbey/shower/blob/master/themes/ribbon/styles/style.css#L413

-o-foo -> Operator Error Operator Name vs. -ms-foo -> Operator Name Operator Name.

I guess this is due to the following regex in the CssLexer: https://bitbucket.org/birkenfeld/pygments-main/src/f8f6f70f3ded/pygments/lexers/web.py#cl-459.

Maybe something like the following would fix this? {{{ (r'[a-zA-Z_]?[a-zA-Z0-9_]+', Name) }}}

Comments (1)

  1. Log in to comment