File tree 2 files changed +11
-17
lines changed
2 files changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](http://semver.org).
10
10
------------------------------------------------------------------------
11
11
* __ Added:__ Highlighting for another 30 keywords used by [ ` mocha.el ` ] [ ]
12
12
* __ Added:__ Highlighting for the [ ` use-package ` ] [ ] macro
13
+ * __ Fixed:__ Highlighting of YASnippets without prologues
13
14
14
15
15
16
Original file line number Diff line number Diff line change @@ -11,21 +11,14 @@ firstLineMatch: """(?xi)
11
11
(?=[\\ s;]|(?<![-*])-\\ *-).*?-\\ *-
12
12
"""
13
13
14
- patterns : [include : " #main" ]
14
+ patterns : [{
15
+ name : " meta.prologue.yasnippet"
16
+ begin : " \\ A(?=\\ s*(?:$|#))"
17
+ end : " (?:^|\\ G)(?=\\ s*(?:[^\\ s#]|#+\\ s*--\\ s*$))"
18
+ patterns : [include : " #prologue-lines" ]
19
+ }, include : " #body" ]
15
20
16
21
repository :
17
- main :
18
- patterns : [
19
- {include : " #prologue" }
20
- {include : " #body" }
21
- ]
22
-
23
- prologue :
24
- name : " meta.prologue.yasnippet"
25
- begin : " \\ A"
26
- end : " ^(?=\\ s*#+\\ s*--\\ s*$)"
27
- patterns : [include : " #prologue-lines" ]
28
-
29
22
" prologue-lines" :
30
23
begin : " ^\\ s*(#+)(?!\\ s*--\\ s*$)"
31
24
end : " $"
@@ -110,12 +103,12 @@ repository:
110
103
111
104
body :
112
105
name : " meta.snippet-body.yasnippet"
113
- begin : " ^\\ s*(#+)\\ s*(--)\\ s*$\\ n?"
106
+ begin : " ^\\ s*(( #+)\\ s*(--)\\ s*$\\ n?|(?=[^ \\ s#])) "
114
107
end : " (?=A)B"
115
108
beginCaptures :
116
- 0 : name : " comment.line.number-sign.yasnippet"
117
- 1 : name : " punctuation.definition.comment.number-sign.yasnippet"
118
- 2 : name : " punctuation.terminator.double-dash.yasnippet"
109
+ 1 : name : " comment.line.number-sign.yasnippet"
110
+ 2 : name : " punctuation.definition.comment.number-sign.yasnippet"
111
+ 3 : name : " punctuation.terminator.double-dash.yasnippet"
119
112
patterns : [
120
113
{include : " #tab-stops" }
121
114
{include : " #indentation-marker" }
You can’t perform that action at this time.
0 commit comments