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:
1 parent
aac0d1dda0
commit
c36dd48339
3 files changed
+9
-1
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user