Fixes https://github.com/hashicorp/terraform/issues/6359 and several related issues by unescaping a double backslash within braces to a single backslash. This bumps into the bit of HIL that still hangs out in HCL - for values that aren't interpolated, like Terraform's variable defaults - users were unable to get a backslash to show up within `${}`. That's because `${}` is handled specially to allow for, e.g., double quotes inside of braces. Here, we add `\\` as a special cased escape (along with `\"`) so users can get backslashes in these scenarios by doubling them up.
7 lines
136 B
HCL
7 lines
136 B
HCL
foo = "bar\"baz\\n"
|
|
bar = "new\nline"
|
|
qux = "back\\slash"
|
|
qax = "slash\\:colon"
|
|
nested = "${HH\\:mm\\:ss}"
|
|
nestedquotes = "${\"okay\"}"
|