Skip to content

Commit

Permalink
Add a load-bearing escape into the comment regex
Browse files Browse the repository at this point in the history
Some other tooling may not understand javascript specific semantics for
regexes and really mess with someone's day!

![simpsons load bearing poster](https://media.giphy.com/media/l2JdUolkmRLmZM9Fu/giphy.gif)
  • Loading branch information
dfreedm committed Nov 6, 2017
1 parent d27175a commit 81383a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/css-parse.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@

// helper regexp's
_rx: {
comments: /\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,
// warning, this regex contains load-bearing escapes
comments: /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,
port: /@import[^;]*;/gim,
customProp: /(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,
mixinProp: /(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,
Expand Down

0 comments on commit 81383a7

Please sign in to comment.