Commit 34f0bd5247b6f6a8ae9388738f1987764a24e5f3

Lea Verou 2012-09-13T10:03:42

Merge pull request #35 from SimonSapin/patch-1 Fix parsing of CSS at-rules

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/components/prism-css.js b/components/prism-css.js
index 4f92e2f..77f94d4 100644
--- a/components/prism-css.js
+++ b/components/prism-css.js
@@ -1,6 +1,6 @@
 Prism.languages.css = {
 	'comment': /\/\*[\w\W]*?\*\//g,
-	'atrule': /@[\w-]+?(\s+.+)?(?=\s*{|\s*;)/gi,
+	'atrule': /@[\w-]+?(\s+[^;{]+)?(?=\s*{|\s*;)/gi,
 	'url': /url\((["']?).*?\1\)/gi,
 	'selector': /[^\{\}\s][^\{\}]*(?=\s*\{)/g,
 	'property': /(\b|\B)[a-z-]+(?=\s*:)/ig,