trullock / NUglify

NUglify is a HTML, JavaScript and CSS minification Library for .NET (fork of AjaxMin + new features)
Other
396 stars 79 forks source link

(CSS): Escaped identifiers are re-escaped when they shouldn't be #379

Closed jafin closed 9 months ago

jafin commented 10 months ago

Describe the bug

Uglify.Css is escaping already escaped characters in class identifiers The example below is output from tailwind build.

To Reproduce

var result = Uglify.Css(@"
.\!inline-flex {
    display: inline-flex!important
}
");
Console.WriteLine(result.Code);

Actual

.\\21inline-flex {
    display: inline-flex!important
}

Expected

.\!inline-flex {
    display: inline-flex!important
}

I've done up a PR but I have been unable to run the tests locally (Am not setup for net4.6) ,

trullock commented 9 months ago

Fixed in v1.21.3

jafin commented 9 months ago

Thank you!