@markup-carve/carve-grammars 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1023 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3
+ "name": "carve",
4
+ "scopeName": "source.carve",
5
+ "fileTypes": [
6
+ "crv"
7
+ ],
8
+ "aliases": [
9
+ "crv"
10
+ ],
11
+ "patterns": [
12
+ {
13
+ "include": "#frontmatter"
14
+ },
15
+ {
16
+ "include": "#fenced_code"
17
+ },
18
+ {
19
+ "include": "#heading"
20
+ },
21
+ {
22
+ "include": "#hr"
23
+ },
24
+ {
25
+ "include": "#block_comment"
26
+ },
27
+ {
28
+ "include": "#line_comment"
29
+ },
30
+ {
31
+ "include": "#admonition"
32
+ },
33
+ {
34
+ "include": "#blockquote"
35
+ },
36
+ {
37
+ "include": "#abbreviation"
38
+ },
39
+ {
40
+ "include": "#link_ref_def"
41
+ },
42
+ {
43
+ "include": "#caption"
44
+ },
45
+ {
46
+ "include": "#definition_list"
47
+ },
48
+ {
49
+ "include": "#table_row"
50
+ },
51
+ {
52
+ "include": "#list_continuation"
53
+ },
54
+ {
55
+ "include": "#multiline_cell"
56
+ },
57
+ {
58
+ "include": "#task_item"
59
+ },
60
+ {
61
+ "include": "#list_item"
62
+ },
63
+ {
64
+ "include": "#numbered_item"
65
+ },
66
+ {
67
+ "include": "#inline"
68
+ }
69
+ ],
70
+ "repository": {
71
+ "frontmatter": {
72
+ "begin": "\\A---\\s*$",
73
+ "end": "^---\\s*$",
74
+ "name": "meta.frontmatter.carve",
75
+ "beginCaptures": {
76
+ "0": {
77
+ "name": "punctuation.definition.frontmatter.carve"
78
+ }
79
+ },
80
+ "endCaptures": {
81
+ "0": {
82
+ "name": "punctuation.definition.frontmatter.carve"
83
+ }
84
+ },
85
+ "patterns": [
86
+ {
87
+ "match": "^([A-Za-z_][\\w-]*)\\s*(:)",
88
+ "captures": {
89
+ "1": {
90
+ "name": "entity.name.tag.yaml.carve"
91
+ },
92
+ "2": {
93
+ "name": "punctuation.separator.key-value.yaml.carve"
94
+ }
95
+ }
96
+ }
97
+ ]
98
+ },
99
+ "fenced_code": {
100
+ "begin": "^(\\s*)(`{3,}|~{3,})\\s*(=?[a-zA-Z0-9_-]*)\\s*(\"[^\"\\n]*\")?\\s*(\\[[^\\]\\n]*\\])?\\s*$",
101
+ "beginCaptures": {
102
+ "2": {
103
+ "name": "punctuation.definition.fenced.carve"
104
+ },
105
+ "3": {
106
+ "name": "fenced_code.block.language.carve"
107
+ },
108
+ "4": {
109
+ "name": "string.quoted.double.fenced.title.carve"
110
+ },
111
+ "5": {
112
+ "name": "constant.other.label.fenced.carve"
113
+ }
114
+ },
115
+ "end": "^\\1\\2\\s*$",
116
+ "endCaptures": {
117
+ "0": {
118
+ "name": "punctuation.definition.fenced.carve"
119
+ }
120
+ },
121
+ "name": "markup.fenced_code.block.carve",
122
+ "contentName": "markup.raw.code.carve"
123
+ },
124
+ "heading": {
125
+ "match": "^(#{1,6})\\s+(.*?)\\s*$",
126
+ "captures": {
127
+ "1": {
128
+ "name": "punctuation.definition.heading.carve"
129
+ },
130
+ "2": {
131
+ "name": "entity.name.section.carve"
132
+ }
133
+ },
134
+ "name": "markup.heading.carve"
135
+ },
136
+ "hr": {
137
+ "match": "^\\s*-{3,}\\s*$",
138
+ "name": "meta.separator.thematic-break.carve"
139
+ },
140
+ "block_comment": {
141
+ "begin": "^\\s*%%%\\s*$",
142
+ "end": "^\\s*%%%\\s*$",
143
+ "name": "comment.block.carve"
144
+ },
145
+ "line_comment": {
146
+ "match": "^\\s*%%(?!%).*$",
147
+ "name": "comment.line.percent.carve"
148
+ },
149
+ "trailing_comment": {
150
+ "match": "(?<=[ \\t])%%.*$",
151
+ "name": "comment.line.percent.carve"
152
+ },
153
+ "admonition": {
154
+ "match": "^(:{3,})(?:[ \\t]*(\\||\\\\)|[ \\t]*([a-zA-Z_][\\w-]*)(?:[ \\t]+(\"[^\"\\n]*\"))?(?:[ \\t]+(\\[[^\\]\\n]*\\]))?|[ \\t]*(\\[[^\\]\\n]*\\]))?[ \\t]*$",
155
+ "captures": {
156
+ "1": {
157
+ "name": "punctuation.definition.admonition.carve"
158
+ },
159
+ "2": {
160
+ "name": "entity.name.tag.admonition.carve"
161
+ },
162
+ "3": {
163
+ "name": "entity.name.tag.admonition.carve"
164
+ },
165
+ "4": {
166
+ "name": "string.quoted.double.admonition.title.carve"
167
+ },
168
+ "5": {
169
+ "name": "constant.other.label.admonition.carve"
170
+ },
171
+ "6": {
172
+ "name": "constant.other.label.admonition.carve"
173
+ }
174
+ },
175
+ "name": "meta.admonition.carve"
176
+ },
177
+ "blockquote": {
178
+ "match": "^(>)\\s*(.*)$",
179
+ "captures": {
180
+ "1": {
181
+ "name": "punctuation.definition.quote.carve"
182
+ },
183
+ "2": {
184
+ "name": "markup.quote.carve"
185
+ }
186
+ },
187
+ "name": "markup.quote.carve"
188
+ },
189
+ "caption": {
190
+ "match": "^(\\^)\\s+(.*)$",
191
+ "captures": {
192
+ "1": {
193
+ "name": "punctuation.definition.caption.carve"
194
+ },
195
+ "2": {
196
+ "name": "markup.caption.carve"
197
+ }
198
+ },
199
+ "name": "meta.caption.carve"
200
+ },
201
+ "abbreviation": {
202
+ "match": "^(\\*)(\\[)([A-Z][A-Z0-9]*)(\\])(:)\\s+(.*)$",
203
+ "captures": {
204
+ "1": {
205
+ "name": "punctuation.definition.abbreviation.carve"
206
+ },
207
+ "2": {
208
+ "name": "punctuation.definition.abbreviation.carve"
209
+ },
210
+ "3": {
211
+ "name": "entity.name.abbreviation.carve"
212
+ },
213
+ "4": {
214
+ "name": "punctuation.definition.abbreviation.carve"
215
+ },
216
+ "5": {
217
+ "name": "punctuation.separator.carve"
218
+ },
219
+ "6": {
220
+ "name": "string.unquoted.abbreviation.carve"
221
+ }
222
+ },
223
+ "name": "meta.abbreviation.carve"
224
+ },
225
+ "link_ref_def": {
226
+ "match": "^([ \\t]*)(\\[)(?![@^])([^\\]]+)(\\])(:)[ \\t]+(\\S+)(?:[ \\t]+(\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'))?",
227
+ "captures": {
228
+ "2": {
229
+ "name": "punctuation.definition.link.carve"
230
+ },
231
+ "3": {
232
+ "name": "constant.other.reference.link.carve"
233
+ },
234
+ "4": {
235
+ "name": "punctuation.definition.link.carve"
236
+ },
237
+ "5": {
238
+ "name": "punctuation.separator.carve"
239
+ },
240
+ "6": {
241
+ "name": "markup.underline.link.carve"
242
+ },
243
+ "7": {
244
+ "name": "string.quoted.link.title.carve"
245
+ }
246
+ },
247
+ "name": "meta.link.reference.def.carve"
248
+ },
249
+ "table_row": {
250
+ "begin": "^(?=\\|)",
251
+ "end": "$",
252
+ "patterns": [
253
+ {
254
+ "match": "(\\|=)([<~>]?)",
255
+ "captures": {
256
+ "1": {
257
+ "name": "keyword.operator.table.header.carve"
258
+ },
259
+ "2": {
260
+ "name": "keyword.operator.table.alignment.carve"
261
+ }
262
+ }
263
+ },
264
+ {
265
+ "match": "(\\|)([<~>])(?=\\s)",
266
+ "captures": {
267
+ "1": {
268
+ "name": "punctuation.separator.table.carve"
269
+ },
270
+ "2": {
271
+ "name": "keyword.operator.table.alignment.carve"
272
+ }
273
+ }
274
+ },
275
+ {
276
+ "match": "(?<=\\|)\\s*(\\^)\\s*(?=\\|)",
277
+ "captures": {
278
+ "1": {
279
+ "name": "keyword.operator.table.rowspan.carve"
280
+ }
281
+ }
282
+ },
283
+ {
284
+ "match": "(?<=\\|)\\s*(<)\\s*(?=\\|)",
285
+ "captures": {
286
+ "1": {
287
+ "name": "keyword.operator.table.colspan.carve"
288
+ }
289
+ }
290
+ },
291
+ {
292
+ "comment": "Column alignment markers (:--, --:, :-:, ---) between pipes. Matched before #inline so smart-typography does not swallow the dashes.",
293
+ "match": "(?<=\\|)\\s*(:?-+:?)\\s*(?=\\|)",
294
+ "captures": {
295
+ "1": {
296
+ "name": "keyword.operator.table.alignment.carve"
297
+ }
298
+ }
299
+ },
300
+ {
301
+ "match": "\\|",
302
+ "name": "punctuation.separator.table.carve"
303
+ },
304
+ {
305
+ "include": "#inline"
306
+ }
307
+ ]
308
+ },
309
+ "multiline_cell": {
310
+ "match": "^(\\+)(.*)$",
311
+ "captures": {
312
+ "1": {
313
+ "name": "keyword.operator.table.continuation.carve"
314
+ }
315
+ }
316
+ },
317
+ "task_item": {
318
+ "match": "^(\\s*)([-*])\\s+(\\[)([ xX\\-_>?])(\\])\\s+",
319
+ "captures": {
320
+ "2": {
321
+ "name": "punctuation.definition.list.carve"
322
+ },
323
+ "3": {
324
+ "name": "punctuation.definition.checkbox.carve"
325
+ },
326
+ "4": {
327
+ "name": "constant.language.checkbox.carve"
328
+ },
329
+ "5": {
330
+ "name": "punctuation.definition.checkbox.carve"
331
+ }
332
+ }
333
+ },
334
+ "list_continuation": {
335
+ "comment": "A lone `+` at the list-marker column is the list-continuation marker (not a bullet -- `+` is never a bullet in Carve); it attaches the following flush-left block to the item.",
336
+ "match": "^(\\s*)(\\+)(\\s*)$",
337
+ "captures": {
338
+ "2": {
339
+ "name": "punctuation.definition.list.continuation.carve"
340
+ }
341
+ }
342
+ },
343
+ "list_item": {
344
+ "match": "^(\\s*)([-*])(\\s+)((?:[-*]\\s+)*)",
345
+ "captures": {
346
+ "2": {
347
+ "name": "punctuation.definition.list.unnumbered.carve"
348
+ },
349
+ "4": {
350
+ "name": "punctuation.definition.list.unnumbered.carve"
351
+ }
352
+ },
353
+ "comment": "A marker line may carry several markers (`- - A` opens two nested lists), so scope each one, not only the line-anchored first."
354
+ },
355
+ "numbered_item": {
356
+ "match": "^(\\s*)(\\d+\\.)(\\s+)",
357
+ "captures": {
358
+ "2": {
359
+ "name": "punctuation.definition.list.numbered.carve"
360
+ }
361
+ }
362
+ },
363
+ "inline": {
364
+ "patterns": [
365
+ {
366
+ "include": "#math_inline"
367
+ },
368
+ {
369
+ "include": "#footnote_inline"
370
+ },
371
+ {
372
+ "include": "#code_inline_multi"
373
+ },
374
+ {
375
+ "include": "#code_inline"
376
+ },
377
+ {
378
+ "include": "#trailing_comment"
379
+ },
380
+ {
381
+ "include": "#image"
382
+ },
383
+ {
384
+ "include": "#link_inline"
385
+ },
386
+ {
387
+ "include": "#link_ref"
388
+ },
389
+ {
390
+ "include": "#extension_block"
391
+ },
392
+ {
393
+ "include": "#extension_inline"
394
+ },
395
+ {
396
+ "include": "#symbol"
397
+ },
398
+ {
399
+ "include": "#critic_add"
400
+ },
401
+ {
402
+ "include": "#critic_del"
403
+ },
404
+ {
405
+ "include": "#critic_sub"
406
+ },
407
+ {
408
+ "include": "#critic_highlight"
409
+ },
410
+ {
411
+ "include": "#critic_comment"
412
+ },
413
+ {
414
+ "include": "#highlight"
415
+ },
416
+ {
417
+ "include": "#subscript"
418
+ },
419
+ {
420
+ "include": "#superscript"
421
+ },
422
+ {
423
+ "include": "#forced_strong"
424
+ },
425
+ {
426
+ "include": "#forced_italic"
427
+ },
428
+ {
429
+ "include": "#forced_underline"
430
+ },
431
+ {
432
+ "include": "#forced_strike"
433
+ },
434
+ {
435
+ "include": "#attributes_empty"
436
+ },
437
+ {
438
+ "include": "#attributes"
439
+ },
440
+ {
441
+ "include": "#bold_italic"
442
+ },
443
+ {
444
+ "include": "#strong"
445
+ },
446
+ {
447
+ "include": "#italic"
448
+ },
449
+ {
450
+ "include": "#underline"
451
+ },
452
+ {
453
+ "include": "#strike"
454
+ },
455
+ {
456
+ "include": "#mention"
457
+ },
458
+ {
459
+ "include": "#tag"
460
+ },
461
+ {
462
+ "include": "#cross_ref"
463
+ },
464
+ {
465
+ "include": "#autolink"
466
+ },
467
+ {
468
+ "include": "#footnote_ref"
469
+ },
470
+ {
471
+ "include": "#smart_typography"
472
+ },
473
+ {
474
+ "include": "#escape"
475
+ },
476
+ {
477
+ "include": "#hard_break"
478
+ }
479
+ ]
480
+ },
481
+ "escape": {
482
+ "match": "\\\\[\\\\`*_{}\\[\\]()#+\\-.!~^/<>@%|=,]",
483
+ "name": "constant.character.escape.carve"
484
+ },
485
+ "code_inline_multi": {
486
+ "comment": "Two or more backticks: inline code that may itself contain single backticks; closed by the same run length (\\1).",
487
+ "match": "(`{2,})(.+?)(\\1)",
488
+ "captures": {
489
+ "1": {
490
+ "name": "punctuation.definition.raw.carve"
491
+ },
492
+ "2": {
493
+ "name": "markup.raw.inline.carve"
494
+ },
495
+ "3": {
496
+ "name": "punctuation.definition.raw.carve"
497
+ }
498
+ },
499
+ "name": "markup.raw.inline.carve"
500
+ },
501
+ "code_inline": {
502
+ "match": "(`)([^`\\n]+)(`)",
503
+ "captures": {
504
+ "1": {
505
+ "name": "punctuation.definition.raw.carve"
506
+ },
507
+ "2": {
508
+ "name": "markup.raw.inline.carve"
509
+ },
510
+ "3": {
511
+ "name": "punctuation.definition.raw.carve"
512
+ }
513
+ },
514
+ "name": "markup.raw.inline.carve"
515
+ },
516
+ "image": {
517
+ "match": "(!\\[)([^\\]]*)(\\])(\\()([^)\\s]+)(?:\\s+\"((?:[^\"\\\\]|\\\\.)*)\")?(\\))",
518
+ "captures": {
519
+ "1": {
520
+ "name": "punctuation.definition.image.carve"
521
+ },
522
+ "2": {
523
+ "name": "string.other.image.alt.carve"
524
+ },
525
+ "3": {
526
+ "name": "punctuation.definition.image.carve"
527
+ },
528
+ "4": {
529
+ "name": "punctuation.definition.link.carve"
530
+ },
531
+ "5": {
532
+ "name": "markup.underline.link.image.carve"
533
+ },
534
+ "6": {
535
+ "name": "string.other.link.title.carve"
536
+ },
537
+ "7": {
538
+ "name": "punctuation.definition.link.carve"
539
+ }
540
+ }
541
+ },
542
+ "link_inline": {
543
+ "match": "(\\[)([^\\]]+)(\\])(\\()([^)\\s]+)(?:\\s+\"((?:[^\"\\\\]|\\\\.)*)\")?(\\))",
544
+ "captures": {
545
+ "1": {
546
+ "name": "punctuation.definition.link.carve"
547
+ },
548
+ "2": {
549
+ "name": "string.other.link.title.carve"
550
+ },
551
+ "3": {
552
+ "name": "punctuation.definition.link.carve"
553
+ },
554
+ "4": {
555
+ "name": "punctuation.definition.link.carve"
556
+ },
557
+ "5": {
558
+ "name": "markup.underline.link.carve"
559
+ },
560
+ "6": {
561
+ "name": "string.other.link.description.carve"
562
+ },
563
+ "7": {
564
+ "name": "punctuation.definition.link.carve"
565
+ }
566
+ }
567
+ },
568
+ "link_ref": {
569
+ "match": "(\\[)([^\\]]+)(\\])(\\[)([^\\]]*)(\\])",
570
+ "captures": {
571
+ "1": {
572
+ "name": "punctuation.definition.link.carve"
573
+ },
574
+ "2": {
575
+ "name": "string.other.link.title.carve"
576
+ },
577
+ "3": {
578
+ "name": "punctuation.definition.link.carve"
579
+ },
580
+ "4": {
581
+ "name": "punctuation.definition.link.carve"
582
+ },
583
+ "5": {
584
+ "name": "constant.other.reference.link.carve"
585
+ },
586
+ "6": {
587
+ "name": "punctuation.definition.link.carve"
588
+ }
589
+ }
590
+ },
591
+ "extension_block": {
592
+ "match": "^(:::)\\s+([a-zA-Z][\\w-]*)\\s+(.*)$",
593
+ "captures": {
594
+ "1": {
595
+ "name": "punctuation.definition.extension.carve"
596
+ },
597
+ "2": {
598
+ "name": "entity.name.function.extension.carve"
599
+ },
600
+ "3": {
601
+ "name": "string.unquoted.extension.carve"
602
+ }
603
+ }
604
+ },
605
+ "extension_inline": {
606
+ "match": "(:)([a-zA-Z][\\w-]*)(\\[)([^\\]]*)(\\])(\\{[^}]*\\})?",
607
+ "captures": {
608
+ "1": {
609
+ "name": "punctuation.definition.extension.carve"
610
+ },
611
+ "2": {
612
+ "name": "entity.name.function.extension.carve"
613
+ },
614
+ "3": {
615
+ "name": "punctuation.definition.extension.carve"
616
+ },
617
+ "4": {
618
+ "name": "string.unquoted.extension.carve"
619
+ },
620
+ "5": {
621
+ "name": "punctuation.definition.extension.carve"
622
+ },
623
+ "6": {
624
+ "name": "meta.attributes.carve"
625
+ }
626
+ }
627
+ },
628
+ "symbol": {
629
+ "match": "(?<!\\w)(:)([a-zA-Z0-9+-][\\w+-]*)(:)",
630
+ "captures": {
631
+ "1": {
632
+ "name": "punctuation.definition.symbol.carve"
633
+ },
634
+ "2": {
635
+ "name": "constant.language.symbol.carve"
636
+ },
637
+ "3": {
638
+ "name": "punctuation.definition.symbol.carve"
639
+ }
640
+ }
641
+ },
642
+ "critic_add": {
643
+ "match": "\\{\\+[^}]*\\+\\}",
644
+ "name": "markup.inserted.carve"
645
+ },
646
+ "critic_del": {
647
+ "match": "\\{-[^}]*-\\}",
648
+ "name": "markup.deleted.carve"
649
+ },
650
+ "critic_sub": {
651
+ "match": "\\{~[^}]*~>[^}]*~\\}",
652
+ "name": "markup.changed.carve",
653
+ "comment": "Editorial substitution requires the `~>` arrow; a `{~x~}` with no arrow is forced strikethrough (PART 9 S22)."
654
+ },
655
+ "critic_highlight": {
656
+ "match": "\\{=[^}]*=\\}",
657
+ "name": "markup.highlight.critic.carve"
658
+ },
659
+ "critic_comment": {
660
+ "match": "\\{#[^}]*#\\}",
661
+ "name": "comment.block.critic.carve"
662
+ },
663
+ "forced_strong": {
664
+ "comment": "Forced intraword bold (PART 9 S22). Content may contain the delimiter; the span ends at the closing `\\*}`.",
665
+ "match": "(\\{\\*)(?=\\S)([^\\n]*?)(\\*\\})",
666
+ "captures": {
667
+ "1": {
668
+ "name": "punctuation.definition.bold.carve"
669
+ },
670
+ "2": {
671
+ "name": "markup.bold.carve"
672
+ },
673
+ "3": {
674
+ "name": "punctuation.definition.bold.carve"
675
+ }
676
+ }
677
+ },
678
+ "forced_italic": {
679
+ "comment": "Forced intraword italic (PART 9 S22). Content may contain the delimiter; the span ends at the closing `/}`.",
680
+ "match": "(\\{/)(?=\\S)([^\\n]*?)(/\\})",
681
+ "captures": {
682
+ "1": {
683
+ "name": "punctuation.definition.italic.carve"
684
+ },
685
+ "2": {
686
+ "name": "markup.italic.carve"
687
+ },
688
+ "3": {
689
+ "name": "punctuation.definition.italic.carve"
690
+ }
691
+ }
692
+ },
693
+ "forced_underline": {
694
+ "comment": "Forced intraword underline (PART 9 S22). Content may contain the delimiter; the span ends at the closing `_}`.",
695
+ "match": "(\\{_)(?=\\S)([^\\n]*?)(_\\})",
696
+ "captures": {
697
+ "1": {
698
+ "name": "punctuation.definition.underline.carve"
699
+ },
700
+ "2": {
701
+ "name": "markup.underline.carve"
702
+ },
703
+ "3": {
704
+ "name": "punctuation.definition.underline.carve"
705
+ }
706
+ }
707
+ },
708
+ "forced_strike": {
709
+ "comment": "Forced intraword strikethrough (PART 9 S22). Content may contain the delimiter; the span ends at the closing `~}`.",
710
+ "match": "(\\{~)(?=\\S)([^\\n]*?)(~\\})",
711
+ "captures": {
712
+ "1": {
713
+ "name": "punctuation.definition.strikethrough.carve"
714
+ },
715
+ "2": {
716
+ "name": "markup.strikethrough.carve"
717
+ },
718
+ "3": {
719
+ "name": "punctuation.definition.strikethrough.carve"
720
+ }
721
+ }
722
+ },
723
+ "attributes_empty": {
724
+ "comment": "An empty attribute block is only valid glued to a preceding `]` (`[x]{}` -> <span>x</span>); a bare `{}` in prose is literal text (corpus 123).",
725
+ "match": "(?<=\\])(\\{)(\\s*)(\\})",
726
+ "captures": {
727
+ "1": {
728
+ "name": "punctuation.definition.attributes.carve"
729
+ },
730
+ "3": {
731
+ "name": "punctuation.definition.attributes.carve"
732
+ }
733
+ }
734
+ },
735
+ "attributes": {
736
+ "match": "(\\{)(\\s*(?:[.#][A-Za-z_][\\w-]*|[A-Za-z_][\\w-]*(?:=(?:\"(?:[^\"\\\\\\n]|\\\\.)*\"|'(?:[^'\\\\\\n]|\\\\.)*'|[^\\s\"'{}]+))?)(?:\\s+(?:[.#][A-Za-z_][\\w-]*|[A-Za-z_][\\w-]*(?:=(?:\"(?:[^\"\\\\\\n]|\\\\.)*\"|'(?:[^'\\\\\\n]|\\\\.)*'|[^\\s\"'{}]+))?))*\\s*)(\\})",
737
+ "captures": {
738
+ "1": {
739
+ "name": "punctuation.definition.attributes.carve"
740
+ },
741
+ "2": {
742
+ "name": "meta.attributes.carve"
743
+ },
744
+ "3": {
745
+ "name": "punctuation.definition.attributes.carve"
746
+ }
747
+ },
748
+ "name": "meta.attributes.carve",
749
+ "comment": "Strict identifier (spec PART 9 S14): a class/id/key may not start with a digit, so `{2=v}` stays literal text instead of scoping as an attribute block. An unquoted value may contain dots and colons."
750
+ },
751
+ "bold_italic": {
752
+ "match": "(/\\*)([^*]+)(\\*/)",
753
+ "captures": {
754
+ "1": {
755
+ "name": "punctuation.definition.bold-italic.carve"
756
+ },
757
+ "2": {
758
+ "name": "markup.bold.italic.carve"
759
+ },
760
+ "3": {
761
+ "name": "punctuation.definition.bold-italic.carve"
762
+ }
763
+ }
764
+ },
765
+ "strong": {
766
+ "match": "(?<![\\w*])(\\*)(?=\\S)([^*\\n]+?)(?<=\\S)(\\*)(?![\\w*])",
767
+ "captures": {
768
+ "1": {
769
+ "name": "punctuation.definition.bold.carve"
770
+ },
771
+ "2": {
772
+ "name": "markup.bold.carve"
773
+ },
774
+ "3": {
775
+ "name": "punctuation.definition.bold.carve"
776
+ }
777
+ }
778
+ },
779
+ "italic": {
780
+ "match": "(?<![\\w/])(/)(?=\\S)([^/\\n]+?)(?<=\\S)(/)(?![\\w/])",
781
+ "captures": {
782
+ "1": {
783
+ "name": "punctuation.definition.italic.carve"
784
+ },
785
+ "2": {
786
+ "name": "markup.italic.carve"
787
+ },
788
+ "3": {
789
+ "name": "punctuation.definition.italic.carve"
790
+ }
791
+ }
792
+ },
793
+ "underline": {
794
+ "match": "(?<![\\w_])(_)(?=\\S)([^_\\n]+?)(?<=\\S)(_)(?![\\w_])",
795
+ "captures": {
796
+ "1": {
797
+ "name": "punctuation.definition.underline.carve"
798
+ },
799
+ "2": {
800
+ "name": "markup.underline.text.carve"
801
+ },
802
+ "3": {
803
+ "name": "punctuation.definition.underline.carve"
804
+ }
805
+ }
806
+ },
807
+ "strike": {
808
+ "match": "(?<![\\w~])(~)(?=\\S)([^~\\n]+?)(?<=\\S)(~)(?![\\w~])",
809
+ "captures": {
810
+ "1": {
811
+ "name": "punctuation.definition.strike.carve"
812
+ },
813
+ "2": {
814
+ "name": "markup.strikethrough.carve"
815
+ },
816
+ "3": {
817
+ "name": "punctuation.definition.strike.carve"
818
+ }
819
+ }
820
+ },
821
+ "highlight": {
822
+ "patterns": [
823
+ {
824
+ "match": "(\\{=)(?=\\S)([^\\n]*?)(=\\})",
825
+ "captures": {
826
+ "1": {
827
+ "name": "punctuation.definition.highlight.carve"
828
+ },
829
+ "2": {
830
+ "name": "markup.highlight.carve"
831
+ },
832
+ "3": {
833
+ "name": "punctuation.definition.highlight.carve"
834
+ }
835
+ }
836
+ },
837
+ {
838
+ "match": "(?<![=\\w])(=)(?=\\S)([^=\\n]+?)(?<=\\S)(=)(?![=\\w])",
839
+ "captures": {
840
+ "1": {
841
+ "name": "punctuation.definition.highlight.carve"
842
+ },
843
+ "2": {
844
+ "name": "markup.highlight.carve"
845
+ },
846
+ "3": {
847
+ "name": "punctuation.definition.highlight.carve"
848
+ }
849
+ }
850
+ }
851
+ ]
852
+ },
853
+ "superscript": {
854
+ "patterns": [
855
+ {
856
+ "match": "(\\{\\^)(?=\\S)([^\\n]*?)(\\^\\})",
857
+ "captures": {
858
+ "1": {
859
+ "name": "punctuation.definition.superscript.carve"
860
+ },
861
+ "2": {
862
+ "name": "markup.superscript.carve"
863
+ },
864
+ "3": {
865
+ "name": "punctuation.definition.superscript.carve"
866
+ }
867
+ }
868
+ }
869
+ ]
870
+ },
871
+ "subscript": {
872
+ "patterns": [
873
+ {
874
+ "match": "(\\{,)(?=\\S)([^,\\n]+?)(,\\})",
875
+ "captures": {
876
+ "1": {
877
+ "name": "punctuation.definition.subscript.carve"
878
+ },
879
+ "2": {
880
+ "name": "markup.subscript.carve"
881
+ },
882
+ "3": {
883
+ "name": "punctuation.definition.subscript.carve"
884
+ }
885
+ }
886
+ }
887
+ ]
888
+ },
889
+ "mention": {
890
+ "match": "(?<![\\w])(@)([a-zA-Z][\\w-]*)",
891
+ "captures": {
892
+ "1": {
893
+ "name": "punctuation.definition.mention.carve"
894
+ },
895
+ "2": {
896
+ "name": "variable.other.mention.carve"
897
+ }
898
+ }
899
+ },
900
+ "tag": {
901
+ "match": "(?<![\\w])(#)([a-zA-Z][\\w-]*)",
902
+ "captures": {
903
+ "1": {
904
+ "name": "punctuation.definition.tag.carve"
905
+ },
906
+ "2": {
907
+ "name": "variable.other.tag.carve"
908
+ }
909
+ }
910
+ },
911
+ "autolink": {
912
+ "match": "(<)([a-zA-Z][a-zA-Z0-9+.\\-]*:[^>\\s]+)(>)",
913
+ "captures": {
914
+ "1": {
915
+ "name": "punctuation.definition.link.carve"
916
+ },
917
+ "2": {
918
+ "name": "markup.underline.link.carve"
919
+ },
920
+ "3": {
921
+ "name": "punctuation.definition.link.carve"
922
+ }
923
+ }
924
+ },
925
+ "footnote_ref": {
926
+ "match": "(\\[)(\\^)([^\\]]+)(\\])",
927
+ "captures": {
928
+ "1": {
929
+ "name": "punctuation.definition.footnote.carve"
930
+ },
931
+ "2": {
932
+ "name": "punctuation.definition.footnote.carve"
933
+ },
934
+ "3": {
935
+ "name": "constant.other.footnote.carve"
936
+ },
937
+ "4": {
938
+ "name": "punctuation.definition.footnote.carve"
939
+ }
940
+ }
941
+ },
942
+ "smart_typography": {
943
+ "match": "(---|--|\\.\\.\\.|<->|->|<-|<=|>=)",
944
+ "name": "constant.other.smart_typography.carve"
945
+ },
946
+ "math_inline": {
947
+ "match": "(\\$\\$?)(`)([^`\\n]*)(`)",
948
+ "captures": {
949
+ "1": {
950
+ "name": "punctuation.definition.math.carve"
951
+ },
952
+ "2": {
953
+ "name": "punctuation.definition.math.carve"
954
+ },
955
+ "3": {
956
+ "name": "markup.math.carve"
957
+ },
958
+ "4": {
959
+ "name": "punctuation.definition.math.carve"
960
+ }
961
+ }
962
+ },
963
+ "footnote_inline": {
964
+ "match": "(\\^\\[)([^\\]\\n]*)(\\])",
965
+ "captures": {
966
+ "1": {
967
+ "name": "punctuation.definition.footnote.carve"
968
+ },
969
+ "2": {
970
+ "name": "string.other.footnote.inline.carve"
971
+ },
972
+ "3": {
973
+ "name": "punctuation.definition.footnote.carve"
974
+ }
975
+ }
976
+ },
977
+ "cross_ref": {
978
+ "match": "(</#)([^>\\s]+)(>)",
979
+ "captures": {
980
+ "1": {
981
+ "name": "punctuation.definition.link.carve"
982
+ },
983
+ "2": {
984
+ "name": "markup.underline.link.cross-reference.carve"
985
+ },
986
+ "3": {
987
+ "name": "punctuation.definition.link.carve"
988
+ }
989
+ }
990
+ },
991
+ "hard_break": {
992
+ "match": "(\\\\)$",
993
+ "captures": {
994
+ "1": {
995
+ "name": "constant.character.escape.hard-break.carve"
996
+ }
997
+ }
998
+ },
999
+ "definition_list": {
1000
+ "patterns": [
1001
+ {
1002
+ "match": "^(\\s*)(::)(\\s+)(.*)$",
1003
+ "captures": {
1004
+ "2": {
1005
+ "name": "punctuation.definition.list.definition.carve"
1006
+ },
1007
+ "4": {
1008
+ "name": "entity.name.tag.definition.term.carve"
1009
+ }
1010
+ }
1011
+ },
1012
+ {
1013
+ "match": "^(\\s*)(:)(?=\\s)",
1014
+ "captures": {
1015
+ "2": {
1016
+ "name": "punctuation.definition.list.definition.carve"
1017
+ }
1018
+ }
1019
+ }
1020
+ ]
1021
+ }
1022
+ }
1023
+ }