I've found a bug in the MinificationHelper.IsMinified(string content)
Proplem occurs if the checked content is minified to one single row. If the content is really minimized, it shouldn't contain '\n' at all, so the variable lines might get the value of 0 (zero). This will throw exception when trying to divide totalCharachters by zero
public bool IsMinified(string content)
{
var totalCharacters = content.Length;
var lines = content.Count(x => x == '\n');
var ratio = totalCharacters / lines; // ratio characters per line
return ratio < 200;
}
Minor bug in MinificationHelper
I've found a bug in the MinificationHelper.IsMinified(string content) Proplem occurs if the checked content is minified to one single row. If the content is really minimized, it shouldn't contain '\n' at all, so the variable lines might get the value of 0 (zero). This will throw exception when trying to divide totalCharachters by zero
Thanks, I've fixed the issue on github
Should be in the next release I'm planning to release it this week
is working on a reply...