-
Notifications
You must be signed in to change notification settings - Fork 702
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 lexer errors on heredoc #2162
Comments
From the spec you linked:
This reads to me as if your changed test is not valid, since the final delimiter |
The terraform tool accepts that style without problems though: [michael.hoffmann@fedora ~]$ terraform fmt test.tf
test.tf
[michael.hoffmann@fedora ~]$ cat test.tf
resource "foo" "bar" {
x = <<EOF
testing
EOF
} |
Ah testing with DOC without leading whitespace works though! I get what you say |
Hm, but if terraform itself is happy with the leading whitespace we shouldn't highlight it as error. |
Fixed! |
Thanks @birkenfeld ! |
Add an updated version of pygments. This helps to not depend on the sphinix version or other package to be updated to use pygments on v2.12.0 Previous versions have issues supporint terraform highlight. This avoid this error: ``` WARNING: Could not lex literal_block as "terraform". Highlighting skipped. ``` You can check out more info: pygments/pygments#2162
Terraform lexer has problems when heredoc templates start with "<<" instead of "<<-", to prove i applied the following patch:
And the parser showed alot of errors in the tests:
According to the spec both are valid introductions to heredoc templates.
The text was updated successfully, but these errors were encountered: