Open TheJaredWilcurt opened 2 years ago
Note: I don't really classify this as a bug, since red-perfume
should only be used during a build step and markup will likely either already be minified, or will be minified after red-perfume
finishes it's modifications. So formatting is less important. But would still rather retain whatever formatting was passed in.
Some whitespace changes occur from
parse5
when we parse the HTML to an AST, modify it, and then convert the AST back to a string.Example
Input:
Output:
This may be caused by our code:
If it is not on our end, then it is a problem with
parse5
. We would need to either create a PR against parse5 to fix it (it's pretty well written and clean JS). Or find an alternative HTML parser and swap it out.