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

Range of argument ending with a character preceded by an escape character is off #78

Closed
rcjsuen opened this issue Apr 4, 2020 · 0 comments
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Apr 4, 2020

RUN "\
\
\"
import { DockerfileParser } from 'dockerfile-ast';

let dockerfile = DockerfileParser.parse("RUN \"\\\n\\\n\\\"");
let instruction = dockerfile.getInstructions()[0];
let argument = instruction.getArguments()[0];
console.log(argument.getRange());
{ start: { line: 0, character: 4 },
  end: { line: 1, character: 0 } }

The end position should point at { line: 2, position: 2 } instead given that it ends on the third line and not the second.

@rcjsuen rcjsuen added the bug label Apr 4, 2020
@rcjsuen rcjsuen self-assigned this Apr 4, 2020
@rcjsuen rcjsuen closed this as completed in b08d8b2 Apr 4, 2020
@rcjsuen rcjsuen changed the title Range of argument ending with an escaped quote is off Range of argument ending with a character preceded by an escape character is off Apr 4, 2020
rcjsuen added a commit that referenced this issue Apr 4, 2020
Signed-off-by: Remy Suen <remy.suen@gmail.com>
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