hashicorp/consul-template

Implement indented here documents <<~EOF like Perl does

EugenKon opened this issue · 0 comments

Expected behavior

https://perldoc.perl.org/perlop#Indented-Here-docs

      template {
        data = <<~CONF
        F2
        CONF
        destination = "custom/walk-inside.com.conf"
      }

Should generate

F2

Actual behavior

It generates

        F2

Leading spaces are awkward. I could write without them:

      template {
        data = <<CONF
F2
CONF
        destination = "custom/walk-inside.com.conf"
      }

But in this case code folding feature is broken in many text editors, eg. Visual Studio, Sublime Text.

Implementing this feature will allow to use code folding and generate files without leading spaces.