Skip to content
Browse files

Improved @import RegEx used for automatic backwards @import compiling

  • Loading branch information...
1 parent ad88663 commit 1737c4354aa7c73dc59f87035234f7e64594be69 @marklagendijk committed Jan 8, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 WinLess/Models/File.cs
View
2 WinLess/Models/File.cs
@@ -178,7 +178,7 @@ private List<string> GetLessImportPaths()
if (!string.IsNullOrEmpty(fileText))
{
// find the @imports using regex
- MatchCollection matches = Regex.Matches(fileText, "@import [\"\\']?([^\"\\';]+)[\"\\']?;");
+ MatchCollection matches = Regex.Matches(fileText, "@import\\s*(?:url\\()?\\s*[\"\\']?([^\"\\'\\);]+)[\"\\']?\\s*\\)?\\s*;");
foreach (Match match in matches)
{

0 comments on commit 1737c43

Please sign in to comment.
Something went wrong with that request. Please try again.