@cosense-toolbox/textmate 0.1.0-beta.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,738 @@
1
+ {
2
+ "name": "cosense-x",
3
+ "displayName": "Cosense X",
4
+ "scopeName": "text.cosense-x",
5
+ "aliases": [
6
+ "csnx"
7
+ ],
8
+ "fileTypes": [
9
+ "csnx"
10
+ ],
11
+ "patterns": [
12
+ {
13
+ "include": "#head"
14
+ },
15
+ {
16
+ "include": "#code-block"
17
+ },
18
+ {
19
+ "include": "#table-block"
20
+ },
21
+ {
22
+ "include": "#component"
23
+ },
24
+ {
25
+ "include": "#quote"
26
+ },
27
+ {
28
+ "include": "#inline"
29
+ }
30
+ ],
31
+ "repository": {
32
+ "head": {
33
+ "patterns": [
34
+ {
35
+ "begin": "\\A(?=---[ \\t]*$)",
36
+ "end": "^(?:(?=\\s*</?[A-Z][A-Za-z0-9_.]*(?:[^\\S\\n]|/?>))|(.*)$)",
37
+ "endCaptures": {
38
+ "1": {
39
+ "name": "markup.heading.cosense"
40
+ }
41
+ },
42
+ "patterns": [
43
+ {
44
+ "include": "#frontmatter"
45
+ }
46
+ ],
47
+ "applyEndPatternLast": true
48
+ },
49
+ {
50
+ "name": "markup.heading.cosense",
51
+ "match": "\\A(?!\\s*</?[A-Z][A-Za-z0-9_.]*(?:[^\\S\\n]|/?>)).*$"
52
+ }
53
+ ]
54
+ },
55
+ "frontmatter": {
56
+ "name": "comment.block.frontmatter.cosense",
57
+ "begin": "\\A---[ \\t]*$",
58
+ "end": "^---[ \\t]*$"
59
+ },
60
+ "code-block": {
61
+ "name": "markup.raw.block.cosense",
62
+ "begin": "^([ \\t\\u3000]*)(code:)(.+)$",
63
+ "end": "^(?!\\1[ \\t\\u3000])",
64
+ "beginCaptures": {
65
+ "2": {
66
+ "name": "keyword.other.block.cosense"
67
+ },
68
+ "3": {
69
+ "name": "entity.name.section.block.cosense"
70
+ }
71
+ }
72
+ },
73
+ "table-block": {
74
+ "name": "markup.other.table.cosense",
75
+ "begin": "^([ \\t\\u3000]*)(table:)(.+)$",
76
+ "end": "^(?!\\1[ \\t\\u3000])",
77
+ "beginCaptures": {
78
+ "2": {
79
+ "name": "keyword.other.block.cosense"
80
+ },
81
+ "3": {
82
+ "name": "entity.name.section.block.cosense"
83
+ }
84
+ },
85
+ "patterns": [
86
+ {
87
+ "name": "punctuation.separator.table-cell.cosense",
88
+ "match": "\\t"
89
+ }
90
+ ]
91
+ },
92
+ "component": {
93
+ "name": "meta.tag.component.cosense",
94
+ "begin": "^(?=\\s*</?[A-Z][A-Za-z0-9_.]*(?:[^\\S\\n]|/?>))",
95
+ "end": "$",
96
+ "patterns": [
97
+ {
98
+ "include": "#component-tag"
99
+ }
100
+ ]
101
+ },
102
+ "component-tag": {
103
+ "begin": "^(\\s*)(</?)([A-Z][A-Za-z0-9_.]*)",
104
+ "end": "(/?>)|(?=$)",
105
+ "beginCaptures": {
106
+ "2": {
107
+ "name": "punctuation.definition.tag.begin.cosense"
108
+ },
109
+ "3": {
110
+ "name": "support.class.component.cosense"
111
+ }
112
+ },
113
+ "endCaptures": {
114
+ "1": {
115
+ "name": "punctuation.definition.tag.end.cosense"
116
+ }
117
+ },
118
+ "patterns": [
119
+ {
120
+ "name": "entity.other.attribute-name.cosense",
121
+ "match": "[A-Za-z_:][A-Za-z0-9_:.\\-]*"
122
+ },
123
+ {
124
+ "name": "punctuation.separator.key-value.cosense",
125
+ "match": "="
126
+ },
127
+ {
128
+ "name": "string.quoted.attribute-value.cosense",
129
+ "match": "\"[^\"]*(?:\"|$)|'[^']*(?:'|$)"
130
+ },
131
+ {
132
+ "include": "#expression"
133
+ }
134
+ ]
135
+ },
136
+ "expression": {
137
+ "name": "meta.embedded.expression.cosense",
138
+ "begin": "\\{",
139
+ "end": "\\}|(?=$)",
140
+ "beginCaptures": {
141
+ "0": {
142
+ "name": "punctuation.section.embedded.begin.cosense"
143
+ }
144
+ },
145
+ "endCaptures": {
146
+ "0": {
147
+ "name": "punctuation.section.embedded.end.cosense"
148
+ }
149
+ },
150
+ "patterns": [
151
+ {
152
+ "include": "#expression"
153
+ },
154
+ {
155
+ "name": "string.quoted.cosense",
156
+ "match": "\"[^\"]*\"|'[^']*'"
157
+ },
158
+ {
159
+ "name": "constant.numeric.cosense",
160
+ "match": "\\b\\d+(?:\\.\\d+)?\\b"
161
+ },
162
+ {
163
+ "name": "constant.language.cosense",
164
+ "match": "\\b(?:true|false|null|undefined)\\b"
165
+ }
166
+ ]
167
+ },
168
+ "quote": {
169
+ "name": "markup.quote.cosense",
170
+ "begin": "^[ \\t\\u3000]*(>[> ]*)",
171
+ "end": "$",
172
+ "beginCaptures": {
173
+ "1": {
174
+ "name": "punctuation.definition.quote.begin.cosense"
175
+ }
176
+ },
177
+ "patterns": [
178
+ {
179
+ "include": "#inline"
180
+ }
181
+ ]
182
+ },
183
+ "inline": {
184
+ "patterns": [
185
+ {
186
+ "name": "markup.underline.link.image.cosense",
187
+ "match": "\\[\\[(?:(?:(?i:https?://(?:i\\.)?gyazo\\.com/[0-9a-f]{20,})[^\\s\\[\\]]*)|(?:(?i:https?)://[^\\s\\[\\]?#]*\\.(?i:png|jpe?g|gif|webp|svg|bmp|avif)(?:[?#][^\\s\\[\\]]*)?)|(?:(?i:https?)://[^\\s\\[\\]#]*#[^\\s\\[\\]]*\\.(?i:png|jpe?g|gif|webp|svg|bmp|avif))|(?:(?!\\]\\]).)*?\\.(?i:png|jpe?g|gif|webp|svg|bmp|avif)(?:[?#](?:(?!\\]\\]).)*)?)\\]\\]"
188
+ },
189
+ {
190
+ "name": "markup.bold.cosense",
191
+ "match": "\\[\\[((?:(?!\\]\\]).)+)\\]\\]",
192
+ "captures": {
193
+ "1": {
194
+ "patterns": [
195
+ {
196
+ "include": "#inline-in-emphasis"
197
+ }
198
+ ]
199
+ }
200
+ }
201
+ },
202
+ {
203
+ "name": "constant.other.formula.cosense",
204
+ "begin": "\\[(?=\\$)(?=.*\\])",
205
+ "end": "\\]|(?=$)",
206
+ "patterns": [
207
+ {
208
+ "include": "#bare-bracket"
209
+ }
210
+ ]
211
+ },
212
+ {
213
+ "name": "markup.underline.cosense",
214
+ "begin": "\\[(?![*/\\-_]*?\\*)(?![*/\\-_]*?/)(?![*/\\-_]*?\\-)(?=[*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
215
+ "end": "\\]|(?=$)",
216
+ "patterns": [
217
+ {
218
+ "include": "#inline-in-emphasis"
219
+ },
220
+ {
221
+ "include": "#nested-bracket"
222
+ }
223
+ ]
224
+ },
225
+ {
226
+ "name": "markup.strikethrough.cosense",
227
+ "begin": "\\[(?![*/\\-_]*?\\*)(?![*/\\-_]*?/)(?=[*/\\-_]*?\\-)(?![*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
228
+ "end": "\\]|(?=$)",
229
+ "patterns": [
230
+ {
231
+ "include": "#inline-in-emphasis"
232
+ },
233
+ {
234
+ "include": "#nested-bracket"
235
+ }
236
+ ]
237
+ },
238
+ {
239
+ "name": "markup.underline.cosense markup.strikethrough.cosense",
240
+ "begin": "\\[(?![*/\\-_]*?\\*)(?![*/\\-_]*?/)(?=[*/\\-_]*?\\-)(?=[*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
241
+ "end": "\\]|(?=$)",
242
+ "patterns": [
243
+ {
244
+ "include": "#inline-in-emphasis"
245
+ },
246
+ {
247
+ "include": "#nested-bracket"
248
+ }
249
+ ]
250
+ },
251
+ {
252
+ "name": "markup.italic.cosense",
253
+ "begin": "\\[(?![*/\\-_]*?\\*)(?=[*/\\-_]*?/)(?![*/\\-_]*?\\-)(?![*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
254
+ "end": "\\]|(?=$)",
255
+ "patterns": [
256
+ {
257
+ "include": "#inline-in-emphasis"
258
+ },
259
+ {
260
+ "include": "#nested-bracket"
261
+ }
262
+ ]
263
+ },
264
+ {
265
+ "name": "markup.underline.cosense markup.italic.cosense",
266
+ "begin": "\\[(?![*/\\-_]*?\\*)(?=[*/\\-_]*?/)(?![*/\\-_]*?\\-)(?=[*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
267
+ "end": "\\]|(?=$)",
268
+ "patterns": [
269
+ {
270
+ "include": "#inline-in-emphasis"
271
+ },
272
+ {
273
+ "include": "#nested-bracket"
274
+ }
275
+ ]
276
+ },
277
+ {
278
+ "name": "markup.strikethrough.cosense markup.italic.cosense",
279
+ "begin": "\\[(?![*/\\-_]*?\\*)(?=[*/\\-_]*?/)(?=[*/\\-_]*?\\-)(?![*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
280
+ "end": "\\]|(?=$)",
281
+ "patterns": [
282
+ {
283
+ "include": "#inline-in-emphasis"
284
+ },
285
+ {
286
+ "include": "#nested-bracket"
287
+ }
288
+ ]
289
+ },
290
+ {
291
+ "name": "markup.underline.cosense markup.strikethrough.cosense markup.italic.cosense",
292
+ "begin": "\\[(?![*/\\-_]*?\\*)(?=[*/\\-_]*?/)(?=[*/\\-_]*?\\-)(?=[*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
293
+ "end": "\\]|(?=$)",
294
+ "patterns": [
295
+ {
296
+ "include": "#inline-in-emphasis"
297
+ },
298
+ {
299
+ "include": "#nested-bracket"
300
+ }
301
+ ]
302
+ },
303
+ {
304
+ "name": "markup.bold.cosense",
305
+ "begin": "\\[(?=(?:[/\\-_]*\\*){1}[/\\-_]*\\s)(?![*/\\-_]*?/)(?![*/\\-_]*?\\-)(?![*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
306
+ "end": "\\]|(?=$)",
307
+ "patterns": [
308
+ {
309
+ "include": "#inline-in-emphasis"
310
+ },
311
+ {
312
+ "include": "#nested-bracket"
313
+ }
314
+ ]
315
+ },
316
+ {
317
+ "name": "markup.underline.cosense markup.bold.cosense",
318
+ "begin": "\\[(?=(?:[/\\-_]*\\*){1}[/\\-_]*\\s)(?![*/\\-_]*?/)(?![*/\\-_]*?\\-)(?=[*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
319
+ "end": "\\]|(?=$)",
320
+ "patterns": [
321
+ {
322
+ "include": "#inline-in-emphasis"
323
+ },
324
+ {
325
+ "include": "#nested-bracket"
326
+ }
327
+ ]
328
+ },
329
+ {
330
+ "name": "markup.strikethrough.cosense markup.bold.cosense",
331
+ "begin": "\\[(?=(?:[/\\-_]*\\*){1}[/\\-_]*\\s)(?![*/\\-_]*?/)(?=[*/\\-_]*?\\-)(?![*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
332
+ "end": "\\]|(?=$)",
333
+ "patterns": [
334
+ {
335
+ "include": "#inline-in-emphasis"
336
+ },
337
+ {
338
+ "include": "#nested-bracket"
339
+ }
340
+ ]
341
+ },
342
+ {
343
+ "name": "markup.underline.cosense markup.strikethrough.cosense markup.bold.cosense",
344
+ "begin": "\\[(?=(?:[/\\-_]*\\*){1}[/\\-_]*\\s)(?![*/\\-_]*?/)(?=[*/\\-_]*?\\-)(?=[*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
345
+ "end": "\\]|(?=$)",
346
+ "patterns": [
347
+ {
348
+ "include": "#inline-in-emphasis"
349
+ },
350
+ {
351
+ "include": "#nested-bracket"
352
+ }
353
+ ]
354
+ },
355
+ {
356
+ "name": "markup.italic.cosense markup.bold.cosense",
357
+ "begin": "\\[(?=(?:[/\\-_]*\\*){1}[/\\-_]*\\s)(?=[*/\\-_]*?/)(?![*/\\-_]*?\\-)(?![*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
358
+ "end": "\\]|(?=$)",
359
+ "patterns": [
360
+ {
361
+ "include": "#inline-in-emphasis"
362
+ },
363
+ {
364
+ "include": "#nested-bracket"
365
+ }
366
+ ]
367
+ },
368
+ {
369
+ "name": "markup.underline.cosense markup.italic.cosense markup.bold.cosense",
370
+ "begin": "\\[(?=(?:[/\\-_]*\\*){1}[/\\-_]*\\s)(?=[*/\\-_]*?/)(?![*/\\-_]*?\\-)(?=[*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
371
+ "end": "\\]|(?=$)",
372
+ "patterns": [
373
+ {
374
+ "include": "#inline-in-emphasis"
375
+ },
376
+ {
377
+ "include": "#nested-bracket"
378
+ }
379
+ ]
380
+ },
381
+ {
382
+ "name": "markup.strikethrough.cosense markup.italic.cosense markup.bold.cosense",
383
+ "begin": "\\[(?=(?:[/\\-_]*\\*){1}[/\\-_]*\\s)(?=[*/\\-_]*?/)(?=[*/\\-_]*?\\-)(?![*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
384
+ "end": "\\]|(?=$)",
385
+ "patterns": [
386
+ {
387
+ "include": "#inline-in-emphasis"
388
+ },
389
+ {
390
+ "include": "#nested-bracket"
391
+ }
392
+ ]
393
+ },
394
+ {
395
+ "name": "markup.underline.cosense markup.strikethrough.cosense markup.italic.cosense markup.bold.cosense",
396
+ "begin": "\\[(?=(?:[/\\-_]*\\*){1}[/\\-_]*\\s)(?=[*/\\-_]*?/)(?=[*/\\-_]*?\\-)(?=[*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
397
+ "end": "\\]|(?=$)",
398
+ "patterns": [
399
+ {
400
+ "include": "#inline-in-emphasis"
401
+ },
402
+ {
403
+ "include": "#nested-bracket"
404
+ }
405
+ ]
406
+ },
407
+ {
408
+ "name": "markup.bold.level2.cosense",
409
+ "begin": "\\[(?=(?:[/\\-_]*\\*){2}[/\\-_]*\\s)(?![*/\\-_]*?/)(?![*/\\-_]*?\\-)(?![*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
410
+ "end": "\\]|(?=$)",
411
+ "patterns": [
412
+ {
413
+ "include": "#inline-in-emphasis"
414
+ },
415
+ {
416
+ "include": "#nested-bracket"
417
+ }
418
+ ]
419
+ },
420
+ {
421
+ "name": "markup.underline.cosense markup.bold.level2.cosense",
422
+ "begin": "\\[(?=(?:[/\\-_]*\\*){2}[/\\-_]*\\s)(?![*/\\-_]*?/)(?![*/\\-_]*?\\-)(?=[*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
423
+ "end": "\\]|(?=$)",
424
+ "patterns": [
425
+ {
426
+ "include": "#inline-in-emphasis"
427
+ },
428
+ {
429
+ "include": "#nested-bracket"
430
+ }
431
+ ]
432
+ },
433
+ {
434
+ "name": "markup.strikethrough.cosense markup.bold.level2.cosense",
435
+ "begin": "\\[(?=(?:[/\\-_]*\\*){2}[/\\-_]*\\s)(?![*/\\-_]*?/)(?=[*/\\-_]*?\\-)(?![*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
436
+ "end": "\\]|(?=$)",
437
+ "patterns": [
438
+ {
439
+ "include": "#inline-in-emphasis"
440
+ },
441
+ {
442
+ "include": "#nested-bracket"
443
+ }
444
+ ]
445
+ },
446
+ {
447
+ "name": "markup.underline.cosense markup.strikethrough.cosense markup.bold.level2.cosense",
448
+ "begin": "\\[(?=(?:[/\\-_]*\\*){2}[/\\-_]*\\s)(?![*/\\-_]*?/)(?=[*/\\-_]*?\\-)(?=[*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
449
+ "end": "\\]|(?=$)",
450
+ "patterns": [
451
+ {
452
+ "include": "#inline-in-emphasis"
453
+ },
454
+ {
455
+ "include": "#nested-bracket"
456
+ }
457
+ ]
458
+ },
459
+ {
460
+ "name": "markup.italic.cosense markup.bold.level2.cosense",
461
+ "begin": "\\[(?=(?:[/\\-_]*\\*){2}[/\\-_]*\\s)(?=[*/\\-_]*?/)(?![*/\\-_]*?\\-)(?![*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
462
+ "end": "\\]|(?=$)",
463
+ "patterns": [
464
+ {
465
+ "include": "#inline-in-emphasis"
466
+ },
467
+ {
468
+ "include": "#nested-bracket"
469
+ }
470
+ ]
471
+ },
472
+ {
473
+ "name": "markup.underline.cosense markup.italic.cosense markup.bold.level2.cosense",
474
+ "begin": "\\[(?=(?:[/\\-_]*\\*){2}[/\\-_]*\\s)(?=[*/\\-_]*?/)(?![*/\\-_]*?\\-)(?=[*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
475
+ "end": "\\]|(?=$)",
476
+ "patterns": [
477
+ {
478
+ "include": "#inline-in-emphasis"
479
+ },
480
+ {
481
+ "include": "#nested-bracket"
482
+ }
483
+ ]
484
+ },
485
+ {
486
+ "name": "markup.strikethrough.cosense markup.italic.cosense markup.bold.level2.cosense",
487
+ "begin": "\\[(?=(?:[/\\-_]*\\*){2}[/\\-_]*\\s)(?=[*/\\-_]*?/)(?=[*/\\-_]*?\\-)(?![*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
488
+ "end": "\\]|(?=$)",
489
+ "patterns": [
490
+ {
491
+ "include": "#inline-in-emphasis"
492
+ },
493
+ {
494
+ "include": "#nested-bracket"
495
+ }
496
+ ]
497
+ },
498
+ {
499
+ "name": "markup.underline.cosense markup.strikethrough.cosense markup.italic.cosense markup.bold.level2.cosense",
500
+ "begin": "\\[(?=(?:[/\\-_]*\\*){2}[/\\-_]*\\s)(?=[*/\\-_]*?/)(?=[*/\\-_]*?\\-)(?=[*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
501
+ "end": "\\]|(?=$)",
502
+ "patterns": [
503
+ {
504
+ "include": "#inline-in-emphasis"
505
+ },
506
+ {
507
+ "include": "#nested-bracket"
508
+ }
509
+ ]
510
+ },
511
+ {
512
+ "name": "markup.bold.level3.cosense",
513
+ "begin": "\\[(?=(?:[/\\-_]*\\*){3})(?![*/\\-_]*?/)(?![*/\\-_]*?\\-)(?![*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
514
+ "end": "\\]|(?=$)",
515
+ "patterns": [
516
+ {
517
+ "include": "#inline-in-emphasis"
518
+ },
519
+ {
520
+ "include": "#nested-bracket"
521
+ }
522
+ ]
523
+ },
524
+ {
525
+ "name": "markup.underline.cosense markup.bold.level3.cosense",
526
+ "begin": "\\[(?=(?:[/\\-_]*\\*){3})(?![*/\\-_]*?/)(?![*/\\-_]*?\\-)(?=[*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
527
+ "end": "\\]|(?=$)",
528
+ "patterns": [
529
+ {
530
+ "include": "#inline-in-emphasis"
531
+ },
532
+ {
533
+ "include": "#nested-bracket"
534
+ }
535
+ ]
536
+ },
537
+ {
538
+ "name": "markup.strikethrough.cosense markup.bold.level3.cosense",
539
+ "begin": "\\[(?=(?:[/\\-_]*\\*){3})(?![*/\\-_]*?/)(?=[*/\\-_]*?\\-)(?![*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
540
+ "end": "\\]|(?=$)",
541
+ "patterns": [
542
+ {
543
+ "include": "#inline-in-emphasis"
544
+ },
545
+ {
546
+ "include": "#nested-bracket"
547
+ }
548
+ ]
549
+ },
550
+ {
551
+ "name": "markup.underline.cosense markup.strikethrough.cosense markup.bold.level3.cosense",
552
+ "begin": "\\[(?=(?:[/\\-_]*\\*){3})(?![*/\\-_]*?/)(?=[*/\\-_]*?\\-)(?=[*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
553
+ "end": "\\]|(?=$)",
554
+ "patterns": [
555
+ {
556
+ "include": "#inline-in-emphasis"
557
+ },
558
+ {
559
+ "include": "#nested-bracket"
560
+ }
561
+ ]
562
+ },
563
+ {
564
+ "name": "markup.italic.cosense markup.bold.level3.cosense",
565
+ "begin": "\\[(?=(?:[/\\-_]*\\*){3})(?=[*/\\-_]*?/)(?![*/\\-_]*?\\-)(?![*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
566
+ "end": "\\]|(?=$)",
567
+ "patterns": [
568
+ {
569
+ "include": "#inline-in-emphasis"
570
+ },
571
+ {
572
+ "include": "#nested-bracket"
573
+ }
574
+ ]
575
+ },
576
+ {
577
+ "name": "markup.underline.cosense markup.italic.cosense markup.bold.level3.cosense",
578
+ "begin": "\\[(?=(?:[/\\-_]*\\*){3})(?=[*/\\-_]*?/)(?![*/\\-_]*?\\-)(?=[*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
579
+ "end": "\\]|(?=$)",
580
+ "patterns": [
581
+ {
582
+ "include": "#inline-in-emphasis"
583
+ },
584
+ {
585
+ "include": "#nested-bracket"
586
+ }
587
+ ]
588
+ },
589
+ {
590
+ "name": "markup.strikethrough.cosense markup.italic.cosense markup.bold.level3.cosense",
591
+ "begin": "\\[(?=(?:[/\\-_]*\\*){3})(?=[*/\\-_]*?/)(?=[*/\\-_]*?\\-)(?![*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
592
+ "end": "\\]|(?=$)",
593
+ "patterns": [
594
+ {
595
+ "include": "#inline-in-emphasis"
596
+ },
597
+ {
598
+ "include": "#nested-bracket"
599
+ }
600
+ ]
601
+ },
602
+ {
603
+ "name": "markup.underline.cosense markup.strikethrough.cosense markup.italic.cosense markup.bold.level3.cosense",
604
+ "begin": "\\[(?=(?:[/\\-_]*\\*){3})(?=[*/\\-_]*?/)(?=[*/\\-_]*?\\-)(?=[*/\\-_]*?_)(?=[*/\\-_]+\\s.*\\])[*/\\-_]+\\s+",
605
+ "end": "\\]|(?=$)",
606
+ "patterns": [
607
+ {
608
+ "include": "#inline-in-emphasis"
609
+ },
610
+ {
611
+ "include": "#nested-bracket"
612
+ }
613
+ ]
614
+ },
615
+ {
616
+ "name": "string.other.link.icon.cosense",
617
+ "match": "\\[[^\\[\\]]+\\.icon(?:\\*\\d+)?\\]"
618
+ },
619
+ {
620
+ "name": "markup.underline.link.image.cosense",
621
+ "match": "\\[\\s*(?:(?i:https?)://[^\\s\\[\\]]+\\s+)*(?:(?:(?i:https?://(?:i\\.)?gyazo\\.com/[0-9a-f]{20,})[^\\s\\[\\]]*)|(?:(?i:https?)://[^\\s\\[\\]?#]*\\.(?i:png|jpe?g|gif|webp|svg|bmp|avif)(?:[?#][^\\s\\[\\]]*)?)|(?:(?i:https?)://[^\\s\\[\\]#]*#[^\\s\\[\\]]*\\.(?i:png|jpe?g|gif|webp|svg|bmp|avif)))(?=[\\s\\]])(?:\\s+(?i:https?)://[^\\s\\[\\]]+)*\\s*\\]"
622
+ },
623
+ {
624
+ "name": "markup.underline.link.external.cosense",
625
+ "match": "\\[[^\\[\\]]*(?i:https?)://[^\\s\\[\\]]+[^\\[\\]]*\\]"
626
+ },
627
+ {
628
+ "name": "markup.underline.link.image.cosense",
629
+ "match": "\\[[^\\[\\]]*\\.(?i:png|jpe?g|gif|webp|svg|bmp|avif)\\]"
630
+ },
631
+ {
632
+ "name": "string.other.link.project.cosense",
633
+ "match": "\\[/[^\\[\\]]*\\]"
634
+ },
635
+ {
636
+ "name": "string.other.link.internal.cosense",
637
+ "match": "\\[(?=[^\\[\\]]*[^\\s\\[\\]])[^\\[\\]]+\\]"
638
+ },
639
+ {
640
+ "name": "markup.inline.raw.cosense",
641
+ "match": "`[^`]*`"
642
+ },
643
+ {
644
+ "name": "entity.name.tag.hashtag.cosense",
645
+ "match": "(?:^|(?<=[ \\t\\u3000]))#[^\\s\\[\\]#]+"
646
+ },
647
+ {
648
+ "name": "markup.underline.link.external.cosense",
649
+ "match": "(?i:https?)://[^\\s\\]]+"
650
+ }
651
+ ]
652
+ },
653
+ "inline-in-emphasis": {
654
+ "patterns": [
655
+ {
656
+ "name": "markup.underline.link.image.cosense",
657
+ "match": "\\[\\[(?:(?:(?i:https?://(?:i\\.)?gyazo\\.com/[0-9a-f]{20,})[^\\s\\[\\]]*)|(?:(?i:https?)://[^\\s\\[\\]?#]*\\.(?i:png|jpe?g|gif|webp|svg|bmp|avif)(?:[?#][^\\s\\[\\]]*)?)|(?:(?i:https?)://[^\\s\\[\\]#]*#[^\\s\\[\\]]*\\.(?i:png|jpe?g|gif|webp|svg|bmp|avif))|(?:(?!\\]\\]).)*?\\.(?i:png|jpe?g|gif|webp|svg|bmp|avif)(?:[?#](?:(?!\\]\\]).)*)?)\\]\\]"
658
+ },
659
+ {
660
+ "name": "markup.bold.cosense",
661
+ "match": "\\[\\[((?:(?!\\]\\]).)+)\\]\\]",
662
+ "captures": {
663
+ "1": {
664
+ "patterns": [
665
+ {
666
+ "include": "#inline-in-emphasis"
667
+ }
668
+ ]
669
+ }
670
+ }
671
+ },
672
+ {
673
+ "name": "constant.other.formula.cosense",
674
+ "begin": "\\[(?=\\$)(?=.*\\])",
675
+ "end": "\\]|(?=$)",
676
+ "patterns": [
677
+ {
678
+ "include": "#bare-bracket"
679
+ }
680
+ ]
681
+ },
682
+ {
683
+ "name": "string.other.link.icon.cosense",
684
+ "match": "\\[[^\\[\\]]+\\.icon(?:\\*\\d+)?\\]"
685
+ },
686
+ {
687
+ "name": "markup.underline.link.image.cosense",
688
+ "match": "\\[\\s*(?:(?i:https?)://[^\\s\\[\\]]+\\s+)*(?:(?:(?i:https?://(?:i\\.)?gyazo\\.com/[0-9a-f]{20,})[^\\s\\[\\]]*)|(?:(?i:https?)://[^\\s\\[\\]?#]*\\.(?i:png|jpe?g|gif|webp|svg|bmp|avif)(?:[?#][^\\s\\[\\]]*)?)|(?:(?i:https?)://[^\\s\\[\\]#]*#[^\\s\\[\\]]*\\.(?i:png|jpe?g|gif|webp|svg|bmp|avif)))(?=[\\s\\]])(?:\\s+(?i:https?)://[^\\s\\[\\]]+)*\\s*\\]"
689
+ },
690
+ {
691
+ "name": "markup.underline.link.external.cosense",
692
+ "match": "\\[[^\\[\\]]*(?i:https?)://[^\\s\\[\\]]+[^\\[\\]]*\\]"
693
+ },
694
+ {
695
+ "name": "string.other.link.project.cosense",
696
+ "match": "\\[/[^\\[\\]]*\\]"
697
+ },
698
+ {
699
+ "name": "string.other.link.internal.cosense",
700
+ "match": "\\[(?=[^\\[\\]]*[^\\s\\[\\]])[^\\[\\]]+\\]"
701
+ },
702
+ {
703
+ "name": "markup.inline.raw.cosense",
704
+ "match": "`[^`]*`"
705
+ },
706
+ {
707
+ "name": "entity.name.tag.hashtag.cosense",
708
+ "match": "(?:^|(?<=[ \\t\\u3000]))#[^\\s\\[\\]#]+"
709
+ },
710
+ {
711
+ "name": "markup.underline.link.external.cosense",
712
+ "match": "(?i:https?)://[^\\s\\]]+"
713
+ }
714
+ ]
715
+ },
716
+ "nested-bracket": {
717
+ "begin": "\\[",
718
+ "end": "\\]|(?=$)",
719
+ "patterns": [
720
+ {
721
+ "include": "#inline-in-emphasis"
722
+ },
723
+ {
724
+ "include": "#nested-bracket"
725
+ }
726
+ ]
727
+ },
728
+ "bare-bracket": {
729
+ "begin": "\\[",
730
+ "end": "\\]|(?=$)",
731
+ "patterns": [
732
+ {
733
+ "include": "#bare-bracket"
734
+ }
735
+ ]
736
+ }
737
+ }
738
+ }