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

Comments embedded in an instruction's keyword that spans multiple lines confuses the parser #99

Closed
rcjsuen opened this issue Sep 21, 2021 · 0 comments
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Sep 21, 2021

The instruction should be merged into one instead of being split off because of the comment. This regression was introduced by the fix for #98.

FR\
#
OM
HE\
#
AL\
#
THCHECK
import { DockerfileParser } from "dockerfile-ast";
let dockerfile = DockerfileParser.parse("FR\\\n#\nOM");
console.log(dockerfile.getInstructions()[0].getKeyword());
dockerfile = DockerfileParser.parse("HE\\\n#\nAL\\\n#\nTHCHECK");
console.log(dockerfile.getInstructions()[0].getKeyword());
FR#
HE#
@rcjsuen rcjsuen added the bug label Sep 21, 2021
@rcjsuen rcjsuen self-assigned this Sep 21, 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