Skip to content

Commit

Permalink
Fix SCSS media queries
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Jul 8, 2015
1 parent 588251a commit bf8e032
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion components/prism-scss.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ Prism.languages.scss = Prism.languages.extend('css', {
},
// aturle is just the @***, not the entire rule (to highlight var & stuffs)
// + add ability to highlight number & unit for media queries
'atrule': /@[\w-]+.*?(?=\s+(\(|\{|;))/i,
'atrule': {
pattern: /@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+(\{|;))/i,
inside: {
'property': Prism.languages.css.property,
'punctuation': /[():]/
}
},
// url, compassified
'url': /([-a-z]+-)*url(?=\()/i,
// CSS selector regex is not appropriate for Sass
Expand Down
2 changes: 1 addition & 1 deletion components/prism-scss.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bf8e032

Please sign in to comment.