Skip to content
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

Terraform escape sequences are not processed when parsing strings #171

Open
weaversam8 opened this issue Oct 9, 2024 · 0 comments · May be fixed by #177
Open

Terraform escape sequences are not processed when parsing strings #171

weaversam8 opened this issue Oct 9, 2024 · 0 comments · May be fixed by #177

Comments

@weaversam8
Copy link
Contributor

Example code:

block "block_name" {
  a = "line1\nline2"
}

Expected output:

{'block': [{'block_name': {'a': 'line1\nline2', '__start_line__': 1, '__end_line__': 3}}]}

Actual output (note the extra backslash):

{'block': [{'block_name': {'a': 'line1\\nline2', '__start_line__': 1, '__end_line__': 3}}]}

I plan to fix this in a future PR, just creating this issue for tracking purposes.

weaversam8 added a commit to weaversam8/python-hcl2 that referenced this issue Oct 9, 2024
weaversam8 added a commit to weaversam8/python-hcl2 that referenced this issue Oct 11, 2024
weaversam8 added a commit to weaversam8/python-hcl2 that referenced this issue Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant