Skip to content
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

getLineRanges reports contentLength of 1 for a file's first line if it's blank #94

Closed
JoshuaKGoldberg opened this issue Feb 23, 2019 · 1 comment

Comments

@JoshuaKGoldberg
Copy link
Contributor

See discussion in palantir/tslint#4518. If a file contains these lines:

let 1 = 2;

let b = 2;

...then the reported contentLengths are:

  • 1
  • 10
  • 0
  • 10
@ajafff
Copy link
Owner

ajafff commented Feb 23, 2019

@JoshuaKGoldberg I cannot reproduce this. I created #95 to add some tests for this.

I guess the line is not really empty but contains a BOM. I don't know if this function is the right place to handle this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants