-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Escape or replace invisible or ambiguous characters when formatting strings #4
Labels
Comments
What is a "simple escape sequence"? |
|
ANSI codes should also be escaped. |
@IssueHunt has funded $40.00 to this issue.
|
It'd be great if we could show byte differences when characters look the same, like in this example: avajs/ava#2451 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Invisible characters such as zero-width joiner and non-breaking space, as well as ambiguous characters like other kinds of spaces, combining characters et cetera should be escaped when strings are formatted.
http://graphemica.com/blocks/control-pictures should be used where the behavior of the original character is preserved. This probably only applies to linebreaks.
If a simple escape sequence exist it should be used. Else characters should be escaped using the
\u
sequence.When a string is formatted as a key it must not include linebreaks.
The text was updated successfully, but these errors were encountered: