Skip to content

Commit 64b44bb

Browse files
committed
Add support for missing YASnippet escape sequences
1 parent f6c86c1 commit 64b44bb

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ This project adheres to [Semantic Versioning](http://semver.org).
66
[Unpublished]: ../../compare/v1.4.1...HEAD
77

88

9+
[Unpublished]
10+
------------------------------------------------------------------------
11+
* __Fixed:__ Escaped brackets and quotes not recognised in YASnippets
12+
13+
14+
915
[v1.4.1]
1016
------------------------------------------------------------------------
1117
**August 4th, 2021**

grammars/yasnippet.cson

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ repository:
163163
captures:
164164
1: name: "punctuation.definition.variable.sigil.dollar-sign.yasnippet"
165165

166+
# NOTE: This list should be kept in sync with `yas--escaped-characters`
166167
"escaped-characters":
167168
patterns: [{
168169
# Escaped backslash
@@ -182,6 +183,30 @@ repository:
182183
match: "(\\\\)`"
183184
captures:
184185
1: name: "punctuation.definition.escape.yasnippet"
186+
},{
187+
# \'
188+
name: "constant.character.escape.quote.single.yasnippet"
189+
match: "(\\\\)'"
190+
captures:
191+
1: name: "punctuation.definition.escape.yasnippet"
192+
},{
193+
# \"
194+
name: "constant.character.escape.quote.double.yasnippet"
195+
match: '(\\\\)"'
196+
captures:
197+
1: name: "punctuation.definition.escape.yasnippet"
198+
},{
199+
# \{ \}
200+
name: "constant.character.escape.bracket.curly.brace.yasnippet"
201+
match: "(\\\\)[{}]"
202+
captures:
203+
1: name: "punctuation.definition.escape.yasnippet"
204+
},{
205+
# \( \)
206+
name: "constant.character.escape.bracket.round.parenthesis.yasnippet"
207+
match: "(\\\\)[\\(\\)]"
208+
captures:
209+
1: name: "punctuation.definition.escape.yasnippet"
185210
}]
186211

187212
"embedded-lisp":

0 commit comments

Comments
 (0)