-
Notifications
You must be signed in to change notification settings - Fork 745
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: / in string within interpolated function are not interpreted properly #2087
Comments
After looking a bit more into it. The root cause is that The visual test uses the following example (Note that GitHub highlighting considers this a string): ## Object with regular expression
resource "aws_cloudfront_distribution" "s3_distribution" {
aliases = ["www.${replace(var.domain_name, "/\\.$/", "")}"]
} The documentation for replace says the following:
The issue from #1304 was that I see several things that can be done:
Unfortunately, I am not familiar enough with the project to know if the last two are actually implementable or if the lexer only goes forward. |
I'll open a Merge Request with the removal of Regexps and the proper escape. |
Name of the lexer
Terraform
Code sample
https://rouge.jneen.net/v4.5.1/terraform/bG9jYWxzIHsKICAgICAgICBleGFtcGxlICAgPSAiJHtmdW5jdGlvbl9jYWxsKCIiLCAiIiwgIi8iKX0iCiAgICAgICAgcHJvamVjdF9uYW1lID0gcHJvamVjdF9uYW1lCn0
Additional context
The function call is has a correct syntax
function_call(string, string, string)
enclosed with the interpolation sequence${...}
. (Code won't pass a linter, you can useexample = "${function_call("", "", "/")}/interpolated_string"
instead)Expected behavior:
The text was updated successfully, but these errors were encountered: