Skip to content

Commit

Permalink
CSS: Selector regexp should not include last spaces before brace
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Jul 8, 2015
1 parent 901812c commit f2e2718
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/prism-css.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Prism.languages.css = {
}
},
'url': /url\((?:(["'])(\\[\w\W]|(?!\1)[^\\\r\n])*\1|.*?)\)/i,
'selector': /[^\{\}\s][^\{\};]*(?=\s*\{)/,
'selector': /[^\{\}\s][^\{\};]*?(?=\s*\{)/,
'string': /("|')(\\[\w\W]|(?!\1)[^\\\r\n])*\1/,
'property': /(\b|\B)[\w-]+(?=\s*:)/i,
'important': /\B!important\b/i,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-css.min.js

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

2 changes: 1 addition & 1 deletion prism.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ Prism.languages.css = {
}
},
'url': /url\((?:(["'])(\\[\w\W]|(?!\1)[^\\\r\n])*\1|.*?)\)/i,
'selector': /[^\{\}\s][^\{\};]*(?=\s*\{)/,
'selector': /[^\{\}\s][^\{\};]*?(?=\s*\{)/,
'string': /("|')(\\[\w\W]|(?!\1)[^\\\r\n])*\1/,
'property': /(\b|\B)[\w-]+(?=\s*:)/i,
'important': /\B!important\b/i,
Expand Down

0 comments on commit f2e2718

Please sign in to comment.