Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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;
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...
Write your reply to:
Image will be uploaded when post is submitted