Skip to content

Commit ade6168

Browse files
committed
Pop 3 times to escape HTML attributes in Razor
Yes, this is suspicious.
1 parent a4931cb commit ade6168

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

Razor/Razor.sublime-syntax

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -307,17 +307,9 @@ contexts:
307307
- meta_include_prototype: false
308308
- match: '@@'
309309
scope: constant.character.escape.cs-razor
310-
- match: '\w+@\w+' # prevent email addresses being caught etc
311-
- match: '{{csharp_tag_interpolation_bare}}'
310+
- match: '\B{{csharp_tag_interpolation_bare}}'
312311
scope: punctuation.section.interpolation.begin.razor
313312
push: Packages/HTML (C#)/Razor/embeddings/C# (for C# Razor HTML attribute).sublime-syntax
314-
#push: csharp-interpolation-body
315-
316-
csharp-interpolation-body:
317-
# - clear_scopes: 1
318-
- meta_include_prototype: false
319-
- include: csharp-embedded
320-
- include: immediately-pop
321313

322314
csharp-embedded:
323315
- meta_include_prototype: false

Razor/embeddings/C# (for C# Razor HTML attribute).sublime-syntax

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ contexts:
1010
main:
1111
- meta_prepend: true
1212
- match: (?=")
13-
pop: 1
13+
pop: 3
1414

1515
line_of_code_in:
1616
- meta_prepend: true
1717
- match: (?=")
18-
pop: 1
18+
pop: 3

0 commit comments

Comments
 (0)