mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-05-01 01:00:21 -04:00
Merge pull request #7048 from hashicorp/b-update-hcl
Update HCL to latest version
This commit is contained in:
9
vendor/github.com/hashicorp/hcl/.gitignore
generated
vendored
9
vendor/github.com/hashicorp/hcl/.gitignore
generated
vendored
@@ -1,9 +0,0 @@
|
||||
y.output
|
||||
|
||||
# ignore intellij files
|
||||
.idea
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
*.test
|
||||
3
vendor/github.com/hashicorp/hcl/.travis.yml
generated
vendored
3
vendor/github.com/hashicorp/hcl/.travis.yml
generated
vendored
@@ -1,3 +0,0 @@
|
||||
sudo: false
|
||||
language: go
|
||||
go: 1.5
|
||||
11
vendor/github.com/hashicorp/hcl/hcl/strconv/quote.go
generated
vendored
11
vendor/github.com/hashicorp/hcl/hcl/strconv/quote.go
generated
vendored
@@ -49,7 +49,8 @@ func Unquote(s string) (t string, err error) {
|
||||
for len(s) > 0 {
|
||||
// If we're starting a '${}' then let it through un-unquoted.
|
||||
// Specifically: we don't unquote any characters within the `${}`
|
||||
// section, except for escaped quotes, which we handle specifically.
|
||||
// section, except for escaped quotes and escaped backslashes, which we
|
||||
// handle specifically.
|
||||
if s[0] == '$' && len(s) > 1 && s[1] == '{' {
|
||||
buf = append(buf, '$', '{')
|
||||
s = s[2:]
|
||||
@@ -64,10 +65,12 @@ func Unquote(s string) (t string, err error) {
|
||||
|
||||
s = s[size:]
|
||||
|
||||
// We special case escaped double quotes in interpolations, converting
|
||||
// them to straight double quotes.
|
||||
// We special case escaped double quotes and escaped backslashes in
|
||||
// interpolations, converting them to their unescaped equivalents.
|
||||
if r == '\\' {
|
||||
if q, _ := utf8.DecodeRuneInString(s); q == '"' {
|
||||
q, _ := utf8.DecodeRuneInString(s)
|
||||
switch q {
|
||||
case '"', '\\':
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user