Permalink
Browse files

Add support for `@charset`

  • Loading branch information...
1 parent 17e36da commit 64951967ecfa638e2fe77cfa921b08353755560e @joshvarner joshvarner committed Nov 30, 2010
Showing with 35 additions and 0 deletions.
  1. +32 −0 Syntaxes/CSS.plist
  2. +3 −0 Tests/tests.css
View
@@ -29,6 +29,38 @@
</dict>
<dict>
<key>begin</key>
+ <string>\s*((@)charset\b)\s*</string>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.control.at-rule.charset.css</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.keyword.css</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\s*((?=;|$))</string>
+ <key>name</key>
+ <string>meta.at-rule.charset.css</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#string-double</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#string-single</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
<string>^\s*((@)import\b)</string>
<key>captures</key>
<dict>
View
@@ -1,3 +1,6 @@
+@charset 'UTF-8';
+@charset "utf-8";
+
/* HTML+HTML5 elements */
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,

0 comments on commit 6495196

Please sign in to comment.