First try scss when there's an @import with comma (#2225)

It's annoying that the less parser is so lenient that it drops things instead of throwing :(

Fixes #2125
This commit is contained in:
Christopher Chedeau authored and GitHub committed 2017-06-21 15:45:55 -07:00
1 parent aac0d1dda0
commit c36dd48339
3 files changed
+9 -1

No files matched your search

+1 -1
View File
@@ -209,7 +209,7 @@ function requireParser(isSCSS) {
}
function parse(text) {
const isLikelySCSS = !!text.match(/(\w\s*: [^}:]+|#){|\@import url/);
const isLikelySCSS = !!text.match(/(\w\s*: [^}:]+|#){|\@import[^\n]+(url|,)/);
try {
return parseWithParser(requireParser(isLikelySCSS), text);
} catch (e) {