lib/rouge/lexers/terraform.rb in rouge-4.4.0 vs lib/rouge/lexers/terraform.rb in rouge-4.5.0
- old
+ new
@@ -37,12 +37,13 @@
@builtins ||= %w()
end
state :strings do
rule %r/\\./, Str::Escape
+ rule %r/(\$[\$]+|%[%]+)(\{)/, Str
rule %r/\$\{/ do
- token Keyword
+ token Punctuation
push :interpolation
end
end
state :dq do
@@ -64,10 +65,10 @@
mixin :strings
end
state :interpolation do
rule %r/\}/ do
- token Keyword
+ token Punctuation
pop!
end
mixin :expression
end