Skip to content

Commit 313198e

Browse files
samfromlvmadskristensen
authored andcommitted
Fix for #284. Correctly figure out less and scss dependencies when @import directive is inside other rules like @media. (#286)
1 parent b310cea commit 313198e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WebCompiler/Dependencies/SassDependencyResolver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public override void UpdateFileDependencies(string path)
5050
string content = File.ReadAllText(info.FullName);
5151

5252
//match both <@import "myFile.scss";> and <@import url("myFile.scss");> syntax
53-
var matches = Regex.Matches(content, @"(?<=^@import(?:[\s]+))(?:(?:\(\w+\)))?\s*(?:url)?(?<url>[^;]+)", RegexOptions.Multiline);
53+
var matches = Regex.Matches(content, @"(?<=@import(?:[\s]+))(?:(?:\(\w+\)))?\s*(?:url)?(?<url>[^;]+)", RegexOptions.Multiline);
5454
foreach (Match match in matches)
5555
{
5656
var importedfiles = GetFileInfos(info, match);

0 commit comments

Comments
 (0)