Skip to content

Commit 81383a7

Browse files
committed
Add a load-bearing escape into the comment regex
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)
1 parent d27175a commit 81383a7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/lib/css-parse.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@
171171

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

0 commit comments

Comments
 (0)