File tree Expand file tree Collapse file tree 4 files changed +45
-7
lines changed Expand file tree Collapse file tree 4 files changed +45
-7
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ Core Grammars:
22
22
- fix(ruby) - fix ` |= ` operator false positives (as block arguments) [ Aboobacker MK]
23
23
- fix(sql) - Fixed sql primary key and foreign key spacing issue [ Dxuian]
24
24
- fix(cpp) added flat_set and flat_map as a part of cpp 23 version [ Lavan]
25
+ - fix(yaml) - Fixed special chars in yaml [ Dxuian]
25
26
26
27
New Grammars:
27
28
Original file line number Diff line number Diff line change @@ -20,15 +20,15 @@ export default function(hljs) {
20
20
const KEY = {
21
21
className : 'attr' ,
22
22
variants : [
23
- // added brackets support
24
- { begin : / \w [ \w : ( ) \. / - ] * : (? = [ \t ] | $ ) / } ,
25
- { // double quoted keys - with brackets
26
- begin : / " \w [ \w : ( ) \. / - ] * " : (? = [ \t ] | $ ) / } ,
27
- { // single quoted keys - with brackets
28
- begin : / ' \w [ \w : ( ) \. / - ] * ' : (? = [ \t ] | $ ) / } ,
23
+ // added brackets support and special char support
24
+ { begin : / [ \w * @ ] [ \w * @ : ( ) \. / - ] * : (? = [ \t ] | $ ) / } ,
25
+ { // double quoted keys - with brackets and special char support
26
+ begin : / " [ \w * @ ] [ \w * @ : ( ) \. / - ] * " : (? = [ \t ] | $ ) / } ,
27
+ { // single quoted keys - with brackets and special char support
28
+ begin : / ' [ \w * @ ] [ \w * @ : ( ) \. / - ] * ' : (? = [ \t ] | $ ) / } ,
29
29
]
30
30
} ;
31
-
31
+
32
32
const TEMPLATE_VARIABLES = {
33
33
className : 'template-variable' ,
34
34
variants : [
Original file line number Diff line number Diff line change
1
+ <span class="hljs-comment"># quoted keys</span>
2
+ <span class="hljs-attr">"*":</span>
3
+ <span class="hljs-bullet">-</span> <span class="hljs-string">"**/.env"</span>
4
+
5
+ <span class="hljs-comment"># unquoted keys</span>
6
+ <span class="hljs-attr">*:</span>
7
+ <span class="hljs-bullet">-</span> <span class="hljs-string">"**/.env"</span>
8
+
9
+ <span class="hljs-comment"># special chars in keys:</span>
10
+ <span class="hljs-attr">
[email protected] :*/copilot:</span>
11
+ <span class="hljs-bullet">-</span> <span class="hljs-string">"/__tests__/**"</span>
12
+
13
+ <span class="hljs-comment"># leading special chars in a key</span>
14
+ <span class="hljs-attr">*/copilot:</span>
15
+ <span class="hljs-bullet">-</span> <span class="hljs-string">"/__tests__/**"</span>
16
+
17
+ <span class="hljs-attr">@gitlab.com:gitlab-org/gitlab-runner.git:</span>
18
+ <span class="hljs-bullet">-</span> <span class="hljs-string">"/__tests__/**"</span>
Original file line number Diff line number Diff line change
1
+ # quoted keys
2
+ "*":
3
+ - "**/.env"
4
+
5
+ # unquoted keys
6
+ *:
7
+ - "**/.env"
8
+
9
+ # special chars in keys:
10
+
11
+ - "/__tests__/**"
12
+
13
+ # leading special chars in a key
14
+ */copilot:
15
+ - "/__tests__/**"
16
+
17
+ @gitlab.com:gitlab-org/gitlab-runner.git:
18
+ - "/__tests__/**"
19
+
You can’t perform that action at this time.
0 commit comments