Commits

miketaylr committed 240523f

Add ? to CSSLexer Name regex to account for single letter CSS prefixes.
Also add some prefixes to test.css file to make sure it's getting tested.

Comments (0)

Files changed (2)

pygments/lexers/web.py

             (r'[\[\]();]+', Punctuation),
             (r'"(\\\\|\\"|[^"])*"', String.Double),
             (r"'(\\\\|\\'|[^'])*'", String.Single),
-            (r'[a-zA-Z_][a-zA-Z0-9_]+', Name)
+            (r'[a-zA-Z_]?[a-zA-Z0-9_]+', Name)
         ]
     }
 

tests/examplefiles/test.css

 
 #nav .new {
     display: block;
+    -webkit-border-radius: 5px;
+    -moz-border-radius: 5px;
+    -ms-border-radius: 5px;
+    -o-border-radius: 5px;
+    border-radius: 5px;
 }
 
 ul#nav li.new {