htmlq
htmlq copied to clipboard
htmlq removes the DOCTYPE
HTML5 asks specifically for the DOCTYPE:
<!DOCTYPE html>
but running htmlq removes this. There doesn't seem to be an option to disable this behaviour, and it is certainly not desirable.
After using htmlq, the pages fail to validate with the W3C validator.
The suggested workaround doesn't work either:
<!DOCTYPE html SYSTEM "about:legacy-compat">
Indeed, testing shows that any line starting with <! anywhere in the code is stripped by htmlq.
I confirm this issue.
My usage htmlq -r '#WebPartWPQ5 *' -f "$f" | sponge "$f"
@IGLOU-EU thanks for mentioning sponge--it lead me to the moreutils package, of which I was unaware, and shall find useful. :)