lib/rouge/lexers/powershell.rb in rouge-4.0.0 vs lib/rouge/lexers/powershell.rb in rouge-4.0.1
- old
+ new
@@ -180,10 +180,14 @@
mixin :root
end
state :parameters do
rule %r/`./m, Str::Escape
+ rule %r/\)/ do
+ token Punctuation
+ pop!(2) if in_state?(:interpol) # pop :parameters and :interpol
+ end
rule %r/\s*?\n/, Text::Whitespace, :pop!
rule %r/[;(){}\]]/, Punctuation, :pop!
rule %r/[|=]/, Operator, :pop!
rule %r/[\/\\~\w][-.:\/\\~\w]*/, Name::Other
rule %r/\w[-\w]+/, Name::Other
@@ -234,9 +238,11 @@
mixin :expr
mixin :variable
rule %r/[-+*\/%=!.&|]/, Operator
rule %r/[{}(),:;]/, Punctuation
+
+ rule %r/`$/, Str::Escape # line continuation
end
end
end
end