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