question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

invisible characters cause all sorts of incorrect errors

See original GitHub issue

when (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:open
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rwjbluecommented, Jun 27, 2019

Yes, totally agree! Thankfully, we actually have a way to fix this now.

0reactions
rwjbluecommented, Oct 18, 2019

I think that #850 should fix many/most of these issues.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found