Commit 28b5cbc988897955a21dfd9b4249bb393fc96532

Lea Verou 2012-07-11T04:27:33

Fixed bug with single letter selectors

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/components/prism-css.js b/components/prism-css.js
index 5b3b4a2..ec3060d 100644
--- a/components/prism-css.js
+++ b/components/prism-css.js
@@ -1,7 +1,7 @@
 Prism.languages.css = {
 	'comment': /\/\*[\w\W]*?\*\//g,
 	'atrule': /@[\w-]+?(\s+.+)?(?=\s*{|\s*;)/gi,
-	'selector': /[^\{\}\s][^\{\}]+(?=\s*\{)/g,
+	'selector': /[^\{\}\s][^\{\}]*(?=\s*\{)/g,
 	'property': /(\b|\B)[a-z-]+(?=\s*:)/ig,
 	'important': /\B!important\b/gi,
 	'ignore': /&(lt|gt|amp);/gi,