Closed zambon closed 7 years ago
From the docs: Multiline strings can use shell-style "here doc" syntax, with the string starting with a marker like <<EOF and then the string ending with EOF on a line of its own. The lines of the string and the end marker must not be indented.
And yet, C works just fine. 😏
C works fine because the <<-EOF
isn't being interpreted as the beginning of a multiline string. It should exactly be <<EOF
. At least that is my theory anyway.
The difference -
makes is that the whitespaces in the indentation are ignored. For example, all *
below are not part of the resulting string.
variable "description" {
default = <<EOF
**Insert long text here.
**EOF
}
Anyway, the point I was trying to make is that although one could argue that EOF
should be at the very beginning of the line, the flexibility of having A work would be appreciated! 😊
Most places I've seen (all the ones I can remember at least) examples of the usage of heredocs place the EOF without any indentation, I'd rather the highlighter stuck with that.
Using multiline strings breaks the syntax highlight, unless the termination string is placed at the begining of the line. For example:
A)
B)
C)
Highlight breaks in snippet A, but works in B and C