Checks for unencoded or invisible characters, checks each line length.
Once installed, call it on a file:
This CLI app will check, does your HTML file (or some other extension) contains non-ASCII characters.
Specifically, it will check, are your file contents suitable for 7bit encoding, in other words, are all characters within the basic ASCII range , the first 126^ characters. However, only this check would be short-sighted, as invisible control characters (anything below decimal point 32) fall within ASCII range but are bad.
We don't want any invisible control characters (anything below decimal point 32), EXCEPT:
- HT , horizontal tab, decimal number 9
- LF , new line, decimal number 10
- CR , carriage return, decimal number 13
^ Also, we don't want character at a decimal point 127, DEL , which technically falls within basic ASCII range but might appear broken in email-consumption software.
We're going to use this library to validate our email templates, as a part of final QA. In theory, all email templates should be HTML encoded and have no characters outside the basic ASCII range (or invisible control characters like ETX). In practice, all depends on the server, because your ESP back-end might encode the rogue characters for you. But it might not, and you'd be in trouble.
We're going to prepare for the worst and deliver all our templates ready for ANY encoding, conforming to 7bit spec: no characters beyond first 126 decimal point.
PS. It's 126, not 127 because 127 is "invisible" DEL character which is not acceptable in templates.
Check out the API version which works well in Gulp environment.
See it in the monorepo , on GitHub.
To report bugs or request features or assistance, raise an issue on GitHub .
Any code contributions welcome! All Pull Requests will be dealt promptly.
Copyright © 2010–2021 Roy Revelt and other contributors