invisible characters cause all sorts of incorrect errors
See original GitHub issuewhen (invisible) ASCII control characters exist in a template, all sorts of false linting errors are reported. in this case, the chars are ASCII dec 14 (shift out). I’m not sure what the best solution is for this. add errors for these characters and/or ignore them for linting?
example:
<div>
<div>
<div>
</div>
</div>
<div>
<div>
</div>
<div>
</div>
</div>
</div>
produces the following output:
1:5 error Non-translated string used bare-strings
6:8 error Non-translated string used bare-strings
1:5 error Incorrect indentation for `
` beginning at L1:C5. Expected `
` to be at an indentation of 2 but was found at 0. block-indentation
6:8 error Incorrect indentation for `div` beginning at L2:C3. Expected `</div>` ending at L6:C8 to be at an indentation of 3 but was found at 2. block-indentation
3:4 error Incorrect indentation for `<div>` beginning at L3:C4. Expected `<div>` to be at an indentation of 5 but was found at 4. block-indentation
14:8 error Incorrect indentation for `div` beginning at L7:C5. Expected `</div>` ending at L14:C8 to be at an indentation of 5 but was found at 2. block-indentation
8:4 error Incorrect indentation for `<div>` beginning at L8:C4. Expected `<div>` to be at an indentation of 7 but was found at 4. block-indentation
11:4 error Incorrect indentation for `<div>` beginning at L11:C4. Expected `<div>` to be at an indentation of 7 but was found at 4. block-indentation
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
This Invisible Character Can Cause You Hours of Lost Work ...
This invisible character is a line separator so it cannot be used in a string, hence the error message.
Read more >Display invisible character · Issue #58252 · microsoft/vscode
I've just experienced a compile error caused by Unicode character U+202C and U+202D hiding in pasted C code. It's really hard to locate...
Read more >V1076. Code contains invisible characters that may alter its ...
Character Code Definition
LRE U+202A LEFT‑TO‑RIGHT EMBEDDING
RLE U+202B RIGHT‑TO‑LEFT EMBEDDING
LRO U+202D LEFT‑TO‑RIGHT OVERRIDE
Read more >Invalid text character. Check for unsupported symbol, invisible ...
The cause of this kind of problem is having an invisible character such as a zero-width space, or having accidentally used "smart-quotes" instead...
Read more >Sublime Text / code parse error for no reason, hidden characters
you are unknowingly pasting hidden characters which cause this parse error · Use an hexadecimal editor to find rogue invisible characters you might...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, totally agree! Thankfully, we actually have a way to fix this now.
I think that #850 should fix many/most of these issues.