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

printer: Fix handling of line comments in multi-line statements. #244

Merged
merged 2 commits into from
Apr 4, 2018

Conversation

octo
Copy link
Contributor

@octo octo commented Mar 27, 2018

This fixes comment handling in situations such as:

everything = // comment
42

Previously the comment would "leak" to a later line, potentially disturbing heredoc markers (see the included test for a demonstration).

Kudos to dvyukov/go-fuzz for finding this!

@octo octo changed the title Fix handling of line comments in multi-line statements. printer: Fix handling of line comments in multi-line statements. Mar 27, 2018
@octo octo force-pushed the multiline-assign-comment branch from f7d1681 to c2326d4 Compare April 3, 2018 17:39
@octo
Copy link
Contributor Author

octo commented Apr 3, 2018

Rebased on master to fix merge conflicts.

@mitchellh mitchellh merged commit e9ccac6 into hashicorp:master Apr 4, 2018
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

Successfully merging this pull request may close these issues.

2 participants