Skip to content
Snippets Groups Projects
Commit c69a9200 authored by Charlie Somerville's avatar Charlie Somerville
Browse files

highlight string interpolation properly

parent 1dc0045c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -408,7 +408,7 @@ class SlashLanguageLexer(ExtendedRegexLexer):
def right_angle_bracket(lexer, match, ctx):
if len(ctx.stack) > 1 and ctx.stack[-2] == "string":
ctx.stack.pop()
yield match.start(), Punctuation, u"}"
yield match.start(), String.Interpol, u"}"
ctx.pos = match.end()
pass
 
Loading
Loading
@@ -423,7 +423,7 @@ class SlashLanguageLexer(ExtendedRegexLexer):
"string": [
(r"\\", String.Escape, move_state("string_e")),
(r"\"", String, move_state("slash")),
(r"#\{", Punctuation, "slash"),
(r"#\{", String.Interpol, "slash"),
(r'.|\n', String),
],
"string_e": [
Loading
Loading
Loading
Loading
@@ -408,7 +408,7 @@ class SlashLanguageLexer(ExtendedRegexLexer):
def right_angle_bracket(lexer, match, ctx):
if len(ctx.stack) > 1 and ctx.stack[-2] == "string":
ctx.stack.pop()
yield match.start(), Punctuation, u"}"
yield match.start(), String.Interpol, u"}"
ctx.pos = match.end()
pass
 
Loading
Loading
@@ -423,7 +423,7 @@ class SlashLanguageLexer(ExtendedRegexLexer):
"string": [
(r"\\", String.Escape, move_state("string_e")),
(r"\"", String, move_state("slash")),
(r"#\{", Punctuation, "slash"),
(r"#\{", String.Interpol, "slash"),
(r'.|\n', String),
],
"string_e": [
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment