Skip to content

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