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

Extra newlines confuse parsing of variable names #35

Closed
rcjsuen opened this issue May 25, 2018 · 0 comments
Closed

Extra newlines confuse parsing of variable names #35

rcjsuen opened this issue May 25, 2018 · 0 comments
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented May 25, 2018

It seems the escape parsing is off as only one of the \n in the \n\n has been removed. The name of the variable should be image and not im\nage.

import { DockerfileParser } from 'dockerfile-ast';

const content = "FROM $im\\\n\nage";

let dockerfile = DockerfileParser.parse(content);
let variable = dockerfile.getInstructions()[0].getVariables()[0];
console.log(variable.getName());
im
age
@rcjsuen rcjsuen added the bug label May 25, 2018
@rcjsuen rcjsuen self-assigned this May 25, 2018
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