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

Line's getRange() is inconsistent in its handling of whitespace #92

Closed
rcjsuen opened this issue Jul 25, 2021 · 0 comments
Closed

Line's getRange() is inconsistent in its handling of whitespace #92

rcjsuen opened this issue Jul 25, 2021 · 0 comments
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Jul 25, 2021

const lib = require("dockerfile-ast");
const f1 = lib.DockerfileParser.parse("FR\\ ");
const f2 = lib.DockerfileParser.parse("# c ");
console.log(f1.getRange().end.character);
console.log(f2.getRange().end.character);
3
4

They should either both print 3 or both print 4. I think f1 should be printing 4 here as the escape character conveys intent that the content after the escape character is important.

@rcjsuen rcjsuen added the bug label Jul 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant