-
Notifications
You must be signed in to change notification settings - Fork 3
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
Handle heredoc string delimiters #220
Conversation
540fc6d
to
7196c92
Compare
7196c92
to
ba9dcf2
Compare
0026101
to
2dde7dd
Compare
7d42c55
to
cebc025
Compare
2dde7dd
to
3166ad4
Compare
@@ -88,7 +88,15 @@ | |||
} | |||
|
|||
output "heredoc" { | |||
value = "This is also a template.\nSo we can output the key again ${aKey}\n" | |||
value = <<END | |||
This is also a template.\nSo we can output the key again ${aKey}\n |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this keep \n in the final result now because it's now wrapped in a HEREDOC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great catch, didn't even notice. Fixed now
3166ad4
to
56c0711
Compare
56c0711
to
002c9d8
Compare
Previously our template and string literals only handled strings delimited by quotes, this will inspect the source and maintain the same string delim to handle non escaped and multiline strings.
This is also a template. | ||
So we can output the key again ${aKey} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra whitespace still here
value = <<-END | ||
This is also a template. | ||
So we can output the key again ${aKey} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here
002c9d8
to
6c97ce1
Compare
Maintain HEREDOC (<<EOT style) strings when converting.
Previously our template and string literals only handled strings
delimited by quotes, this will inspect the source and maintain the same
string delim to handle non escaped and multiline strings.
Fixes #219