rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.35k stars 739 forks source link

Terraform: $${ are highlighted as error #2061

Closed Sayrus closed 2 months ago

Sayrus commented 3 months ago

Name of the lexer Terraform

Code sample A sample of the code that produces the bug.

locals {
  demo_dollars = "$${local.demo}"
}

Demo link

image

Additional context This syntax allows escape the literal sequence ${ for later use in templatestring or to pass the raw value somewhere else. https://developer.hashicorp.com/terraform/language/expressions/strings#string-templates

This should be rendered as a string as there is no variable interpolation done there. image