@cosense-toolbox/textmate 0.1.0-beta.5 → 0.1.0-beta.7

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.
@@ -18,6 +18,9 @@
18
18
  {
19
19
  "include": "#table-block"
20
20
  },
21
+ {
22
+ "include": "#command"
23
+ },
21
24
  {
22
25
  "include": "#quote"
23
26
  },
@@ -162,6 +165,14 @@
162
165
  }
163
166
  ]
164
167
  },
168
+ "command": {
169
+ "match": "^[ \\t\\u3000]*([$%] .+)$",
170
+ "captures": {
171
+ "1": {
172
+ "name": "markup.inline.raw.cosense"
173
+ }
174
+ }
175
+ },
165
176
  "quote": {
166
177
  "name": "markup.quote.cosense",
167
178
  "begin": "^[ \\t\\u3000]*(>[> ]*)",
@@ -179,13 +190,17 @@
179
190
  },
180
191
  "inline": {
181
192
  "patterns": [
193
+ {
194
+ "name": "markup.underline.link.media.cosense",
195
+ "match": "\\[\\[(?!(?:(?!\\]\\])[^\\x60])*\\x60.*\\x60)(?i:https?)://[^\\s\\[\\]]+\\.(?i:mp4|webm|mov)\\]\\]"
196
+ },
182
197
  {
183
198
  "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)(?:[?#](?:(?!\\]\\]).)*)?)\\]\\]"
199
+ "match": "\\[\\[(?!(?:(?!\\]\\])[^\\x60])*\\x60.*\\x60)(?:(?:(?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
200
  },
186
201
  {
187
202
  "name": "markup.bold.cosense",
188
- "match": "\\[\\[((?:(?!\\]\\]).)+)\\]\\]",
203
+ "match": "\\[\\[(?!(?:(?!\\]\\])[^\\x60])*\\x60.*\\x60)((?:(?!\\]\\]).)+)\\]\\]",
189
204
  "captures": {
190
205
  "1": {
191
206
  "patterns": [
@@ -198,7 +213,7 @@
198
213
  },
199
214
  {
200
215
  "name": "constant.other.formula.cosense",
201
- "begin": "\\[(?=\\$)(?=.*\\])",
216
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=\\$)(?=.*\\])",
202
217
  "end": "\\]|(?=$)",
203
218
  "patterns": [
204
219
  {
@@ -207,7 +222,7 @@
207
222
  ]
208
223
  },
209
224
  {
210
- "begin": "\\[(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\*)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
225
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\*)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
211
226
  "end": "\\]|(?=$)",
212
227
  "patterns": [
213
228
  {
@@ -220,7 +235,7 @@
220
235
  },
221
236
  {
222
237
  "name": "markup.underline.cosense",
223
- "begin": "\\[(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\*)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
238
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\*)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
224
239
  "end": "\\]|(?=$)",
225
240
  "patterns": [
226
241
  {
@@ -233,7 +248,7 @@
233
248
  },
234
249
  {
235
250
  "name": "markup.strikethrough.cosense",
236
- "begin": "\\[(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\*)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
251
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\*)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
237
252
  "end": "\\]|(?=$)",
238
253
  "patterns": [
239
254
  {
@@ -246,7 +261,7 @@
246
261
  },
247
262
  {
248
263
  "name": "markup.underline.cosense markup.strikethrough.cosense",
249
- "begin": "\\[(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\*)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
264
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\*)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
250
265
  "end": "\\]|(?=$)",
251
266
  "patterns": [
252
267
  {
@@ -259,7 +274,7 @@
259
274
  },
260
275
  {
261
276
  "name": "markup.italic.cosense",
262
- "begin": "\\[(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\*)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
277
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\*)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
263
278
  "end": "\\]|(?=$)",
264
279
  "patterns": [
265
280
  {
@@ -272,7 +287,7 @@
272
287
  },
273
288
  {
274
289
  "name": "markup.underline.cosense markup.italic.cosense",
275
- "begin": "\\[(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\*)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
290
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\*)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
276
291
  "end": "\\]|(?=$)",
277
292
  "patterns": [
278
293
  {
@@ -285,7 +300,7 @@
285
300
  },
286
301
  {
287
302
  "name": "markup.strikethrough.cosense markup.italic.cosense",
288
- "begin": "\\[(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\*)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
303
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\*)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
289
304
  "end": "\\]|(?=$)",
290
305
  "patterns": [
291
306
  {
@@ -298,7 +313,7 @@
298
313
  },
299
314
  {
300
315
  "name": "markup.underline.cosense markup.strikethrough.cosense markup.italic.cosense",
301
- "begin": "\\[(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\*)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
316
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\*)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
302
317
  "end": "\\]|(?=$)",
303
318
  "patterns": [
304
319
  {
@@ -311,7 +326,7 @@
311
326
  },
312
327
  {
313
328
  "name": "markup.bold.cosense",
314
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){1}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
329
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){1}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
315
330
  "end": "\\]|(?=$)",
316
331
  "patterns": [
317
332
  {
@@ -324,7 +339,7 @@
324
339
  },
325
340
  {
326
341
  "name": "markup.underline.cosense markup.bold.cosense",
327
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){1}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
342
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){1}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
328
343
  "end": "\\]|(?=$)",
329
344
  "patterns": [
330
345
  {
@@ -337,7 +352,7 @@
337
352
  },
338
353
  {
339
354
  "name": "markup.strikethrough.cosense markup.bold.cosense",
340
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){1}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
355
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){1}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
341
356
  "end": "\\]|(?=$)",
342
357
  "patterns": [
343
358
  {
@@ -350,7 +365,7 @@
350
365
  },
351
366
  {
352
367
  "name": "markup.underline.cosense markup.strikethrough.cosense markup.bold.cosense",
353
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){1}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
368
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){1}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
354
369
  "end": "\\]|(?=$)",
355
370
  "patterns": [
356
371
  {
@@ -363,7 +378,7 @@
363
378
  },
364
379
  {
365
380
  "name": "markup.italic.cosense markup.bold.cosense",
366
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){1}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
381
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){1}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
367
382
  "end": "\\]|(?=$)",
368
383
  "patterns": [
369
384
  {
@@ -376,7 +391,7 @@
376
391
  },
377
392
  {
378
393
  "name": "markup.underline.cosense markup.italic.cosense markup.bold.cosense",
379
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){1}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
394
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){1}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
380
395
  "end": "\\]|(?=$)",
381
396
  "patterns": [
382
397
  {
@@ -389,7 +404,7 @@
389
404
  },
390
405
  {
391
406
  "name": "markup.strikethrough.cosense markup.italic.cosense markup.bold.cosense",
392
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){1}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
407
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){1}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
393
408
  "end": "\\]|(?=$)",
394
409
  "patterns": [
395
410
  {
@@ -402,7 +417,7 @@
402
417
  },
403
418
  {
404
419
  "name": "markup.underline.cosense markup.strikethrough.cosense markup.italic.cosense markup.bold.cosense",
405
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){1}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
420
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){1}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
406
421
  "end": "\\]|(?=$)",
407
422
  "patterns": [
408
423
  {
@@ -415,7 +430,7 @@
415
430
  },
416
431
  {
417
432
  "name": "markup.bold.level2.cosense",
418
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){2}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
433
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){2}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
419
434
  "end": "\\]|(?=$)",
420
435
  "patterns": [
421
436
  {
@@ -428,7 +443,7 @@
428
443
  },
429
444
  {
430
445
  "name": "markup.underline.cosense markup.bold.level2.cosense",
431
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){2}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
446
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){2}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
432
447
  "end": "\\]|(?=$)",
433
448
  "patterns": [
434
449
  {
@@ -441,7 +456,7 @@
441
456
  },
442
457
  {
443
458
  "name": "markup.strikethrough.cosense markup.bold.level2.cosense",
444
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){2}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
459
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){2}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
445
460
  "end": "\\]|(?=$)",
446
461
  "patterns": [
447
462
  {
@@ -454,7 +469,7 @@
454
469
  },
455
470
  {
456
471
  "name": "markup.underline.cosense markup.strikethrough.cosense markup.bold.level2.cosense",
457
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){2}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
472
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){2}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
458
473
  "end": "\\]|(?=$)",
459
474
  "patterns": [
460
475
  {
@@ -467,7 +482,7 @@
467
482
  },
468
483
  {
469
484
  "name": "markup.italic.cosense markup.bold.level2.cosense",
470
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){2}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
485
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){2}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
471
486
  "end": "\\]|(?=$)",
472
487
  "patterns": [
473
488
  {
@@ -480,7 +495,7 @@
480
495
  },
481
496
  {
482
497
  "name": "markup.underline.cosense markup.italic.cosense markup.bold.level2.cosense",
483
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){2}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
498
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){2}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
484
499
  "end": "\\]|(?=$)",
485
500
  "patterns": [
486
501
  {
@@ -493,7 +508,7 @@
493
508
  },
494
509
  {
495
510
  "name": "markup.strikethrough.cosense markup.italic.cosense markup.bold.level2.cosense",
496
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){2}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
511
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){2}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
497
512
  "end": "\\]|(?=$)",
498
513
  "patterns": [
499
514
  {
@@ -506,7 +521,7 @@
506
521
  },
507
522
  {
508
523
  "name": "markup.underline.cosense markup.strikethrough.cosense markup.italic.cosense markup.bold.level2.cosense",
509
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){2}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
524
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){2}[!\"#%&'()+,\\-./{|}<>_~=]*\\s)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
510
525
  "end": "\\]|(?=$)",
511
526
  "patterns": [
512
527
  {
@@ -519,7 +534,7 @@
519
534
  },
520
535
  {
521
536
  "name": "markup.bold.level3.cosense",
522
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){3})(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
537
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){3})(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
523
538
  "end": "\\]|(?=$)",
524
539
  "patterns": [
525
540
  {
@@ -532,7 +547,7 @@
532
547
  },
533
548
  {
534
549
  "name": "markup.underline.cosense markup.bold.level3.cosense",
535
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){3})(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
550
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){3})(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
536
551
  "end": "\\]|(?=$)",
537
552
  "patterns": [
538
553
  {
@@ -545,7 +560,7 @@
545
560
  },
546
561
  {
547
562
  "name": "markup.strikethrough.cosense markup.bold.level3.cosense",
548
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){3})(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
563
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){3})(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
549
564
  "end": "\\]|(?=$)",
550
565
  "patterns": [
551
566
  {
@@ -558,7 +573,7 @@
558
573
  },
559
574
  {
560
575
  "name": "markup.underline.cosense markup.strikethrough.cosense markup.bold.level3.cosense",
561
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){3})(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
576
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){3})(?![!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
562
577
  "end": "\\]|(?=$)",
563
578
  "patterns": [
564
579
  {
@@ -571,7 +586,7 @@
571
586
  },
572
587
  {
573
588
  "name": "markup.italic.cosense markup.bold.level3.cosense",
574
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){3})(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
589
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){3})(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
575
590
  "end": "\\]|(?=$)",
576
591
  "patterns": [
577
592
  {
@@ -584,7 +599,7 @@
584
599
  },
585
600
  {
586
601
  "name": "markup.underline.cosense markup.italic.cosense markup.bold.level3.cosense",
587
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){3})(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
602
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){3})(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
588
603
  "end": "\\]|(?=$)",
589
604
  "patterns": [
590
605
  {
@@ -597,7 +612,7 @@
597
612
  },
598
613
  {
599
614
  "name": "markup.strikethrough.cosense markup.italic.cosense markup.bold.level3.cosense",
600
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){3})(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
615
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){3})(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?![!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
601
616
  "end": "\\]|(?=$)",
602
617
  "patterns": [
603
618
  {
@@ -610,7 +625,7 @@
610
625
  },
611
626
  {
612
627
  "name": "markup.underline.cosense markup.strikethrough.cosense markup.italic.cosense markup.bold.level3.cosense",
613
- "begin": "\\[(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){3})(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
628
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=(?:[!\"#%&'()+,\\-./{|}<>_~=]*\\*){3})(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?/)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?\\-)(?=[!\"#%&'()*+,\\-./{|}<>_~=]*?_)(?=[!\"#%&'()*+,\\-./{|}<>_~=]+\\s.*\\])[!\"#%&'()*+,\\-./{|}<>_~=]+\\s+",
614
629
  "end": "\\]|(?=$)",
615
630
  "patterns": [
616
631
  {
@@ -623,27 +638,47 @@
623
638
  },
624
639
  {
625
640
  "name": "string.other.link.icon.cosense",
626
- "match": "\\[[^\\[\\]]+\\.icon(?:\\*\\d+)?\\]"
641
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)[^\\[\\]]+\\.icon(?:\\*\\d+)?\\]"
642
+ },
643
+ {
644
+ "name": "markup.underline.link.media.cosense",
645
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?:[NS]\\d+(?:\\.\\d+)?,[EW]\\d+(?:\\.\\d+)?(?:,Z\\d+)?(?:\\s+[^\\[\\]]+)?|[^\\[\\]]+?\\s+[NS]\\d+(?:\\.\\d+)?,[EW]\\d+(?:\\.\\d+)?(?:,Z\\d+)?)\\]"
646
+ },
647
+ {
648
+ "name": "markup.underline.link.media.cosense",
649
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?:(?:https?://(?:www\\.|music\\.|)youtube\\.com/watch\\?(?:[^\\s\\[\\]]+&|)v=[a-zA-Z\\d_-]+(?:&[^\\s\\[\\]]+|))|(?:https?://youtu\\.be/[a-zA-Z\\d_-]+(?:\\?[^\\s\\[\\]]{0,100}|))|(?:https?://(?:www\\.|)youtube\\.com/(?:shorts|live)/[a-zA-Z\\d_-]+(?:\\?[^\\s\\[\\]]+|))|(?:https?://(?:www\\.|music\\.|)youtube\\.com/playlist\\?(?:[^\\s\\[\\]]+&|)list=[a-zA-Z\\d_-]+(?:&[^\\s\\[\\]]+|))|(?:(?i:https?://vimeo\\.com/[0-9]+(?:/[a-z0-9]+)?(?:\\?[^\\s\\[\\]]+|)))|(?:(?i:https?://open\\.spotify\\.com/(?:[^/\\s\\[\\]]+/|)(?:track|artist|playlist|album|episode|show)/[a-zA-Z\\d_-]+(?:\\?[^\\s\\[\\]]{0,100}|)))|(?:(?i:https?://(?:anchor\\.fm|podcasters\\.spotify\\.com/pod/show)/[a-zA-Z\\d_-]+/episodes/[a-zA-Z\\d_-]+(?:/[a-zA-Z\\d_-]+)?(?:\\?[^\\s\\[\\]]{0,100}|)))|(?i:https?)://[^\\s\\[\\]]+\\.(?i:mp4|webm|mov)|(?i:https?)://[^\\s\\[\\]]*\\.(?i:wav|mp3|weba|ogg|aac))\\]"
650
+ },
651
+ {
652
+ "name": "markup.underline.link.media.cosense",
653
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?:(?i:https?)://[^\\s\\[\\]]+\\s+(?i:https?)://[^\\s\\[\\]]*\\.(?i:mp4|webm|mov)(?:\\?[^\\s\\[\\]]+)?|(?i:https?)://[^\\s\\[\\]]*\\.(?i:mp4|webm|mov)(?:\\?[^\\s\\[\\]]+)?\\s+(?i:https?)://[^\\s\\[\\]]+)\\]"
654
+ },
655
+ {
656
+ "name": "markup.underline.link.media.cosense",
657
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?i:https?)://[^\\s\\[\\]]*\\.(?i:wav|mp3|weba|ogg|aac)\\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*\\])[^\\[\\]]*\\]"
658
+ },
659
+ {
660
+ "name": "markup.underline.link.media.cosense",
661
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?!\\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+(?i:https?)://[^\\s\\[\\]]*\\.(?i:wav|mp3|weba|ogg|aac)\\])[^\\[\\]]+\\s(?i:https?)://[^\\s\\[\\]]*\\.(?i:wav|mp3|weba|ogg|aac)\\]"
627
662
  },
628
663
  {
629
664
  "name": "markup.underline.link.image.cosense",
630
- "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*\\]"
665
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)\\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*\\]"
631
666
  },
632
667
  {
633
668
  "name": "markup.underline.link.external.cosense",
634
- "match": "\\[[^\\[\\]]*(?i:https?)://[^\\s\\[\\]]+[^\\[\\]]*\\]"
669
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)[^\\[\\]]*(?i:https?)://[^\\s\\[\\]]+[^\\[\\]]*\\]"
635
670
  },
636
671
  {
637
672
  "name": "markup.underline.link.image.cosense",
638
- "match": "\\[[^\\[\\]]*\\.(?i:png|jpe?g|gif|webp|svg|bmp|avif)\\]"
673
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)[^\\[\\]]*\\.(?i:png|jpe?g|gif|webp|svg|bmp|avif)\\]"
639
674
  },
640
675
  {
641
676
  "name": "string.other.link.project.cosense",
642
- "match": "\\[/[^\\[\\]]*\\]"
677
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)/[^\\[\\]]*\\]"
643
678
  },
644
679
  {
645
680
  "name": "string.other.link.internal.cosense",
646
- "match": "\\[(?=[^\\[\\]]*[^\\s\\[\\]])[^\\[\\]]+\\]"
681
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=[^\\[\\]]*[^\\s\\[\\]])[^\\[\\]]+\\]"
647
682
  },
648
683
  {
649
684
  "name": "markup.inline.raw.cosense",
@@ -661,13 +696,17 @@
661
696
  },
662
697
  "inline-in-emphasis": {
663
698
  "patterns": [
699
+ {
700
+ "name": "markup.underline.link.media.cosense",
701
+ "match": "\\[\\[(?!(?:(?!\\]\\])[^\\x60])*\\x60.*\\x60)(?i:https?)://[^\\s\\[\\]]+\\.(?i:mp4|webm|mov)\\]\\]"
702
+ },
664
703
  {
665
704
  "name": "markup.underline.link.image.cosense",
666
- "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)(?:[?#](?:(?!\\]\\]).)*)?)\\]\\]"
705
+ "match": "\\[\\[(?!(?:(?!\\]\\])[^\\x60])*\\x60.*\\x60)(?:(?:(?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)(?:[?#](?:(?!\\]\\]).)*)?)\\]\\]"
667
706
  },
668
707
  {
669
708
  "name": "markup.bold.cosense",
670
- "match": "\\[\\[((?:(?!\\]\\]).)+)\\]\\]",
709
+ "match": "\\[\\[(?!(?:(?!\\]\\])[^\\x60])*\\x60.*\\x60)((?:(?!\\]\\]).)+)\\]\\]",
671
710
  "captures": {
672
711
  "1": {
673
712
  "patterns": [
@@ -680,7 +719,7 @@
680
719
  },
681
720
  {
682
721
  "name": "constant.other.formula.cosense",
683
- "begin": "\\[(?=\\$)(?=.*\\])",
722
+ "begin": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=\\$)(?=.*\\])",
684
723
  "end": "\\]|(?=$)",
685
724
  "patterns": [
686
725
  {
@@ -690,23 +729,43 @@
690
729
  },
691
730
  {
692
731
  "name": "string.other.link.icon.cosense",
693
- "match": "\\[[^\\[\\]]+\\.icon(?:\\*\\d+)?\\]"
732
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)[^\\[\\]]+\\.icon(?:\\*\\d+)?\\]"
733
+ },
734
+ {
735
+ "name": "markup.underline.link.media.cosense",
736
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?:[NS]\\d+(?:\\.\\d+)?,[EW]\\d+(?:\\.\\d+)?(?:,Z\\d+)?(?:\\s+[^\\[\\]]+)?|[^\\[\\]]+?\\s+[NS]\\d+(?:\\.\\d+)?,[EW]\\d+(?:\\.\\d+)?(?:,Z\\d+)?)\\]"
737
+ },
738
+ {
739
+ "name": "markup.underline.link.media.cosense",
740
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?:(?:https?://(?:www\\.|music\\.|)youtube\\.com/watch\\?(?:[^\\s\\[\\]]+&|)v=[a-zA-Z\\d_-]+(?:&[^\\s\\[\\]]+|))|(?:https?://youtu\\.be/[a-zA-Z\\d_-]+(?:\\?[^\\s\\[\\]]{0,100}|))|(?:https?://(?:www\\.|)youtube\\.com/(?:shorts|live)/[a-zA-Z\\d_-]+(?:\\?[^\\s\\[\\]]+|))|(?:https?://(?:www\\.|music\\.|)youtube\\.com/playlist\\?(?:[^\\s\\[\\]]+&|)list=[a-zA-Z\\d_-]+(?:&[^\\s\\[\\]]+|))|(?:(?i:https?://vimeo\\.com/[0-9]+(?:/[a-z0-9]+)?(?:\\?[^\\s\\[\\]]+|)))|(?:(?i:https?://open\\.spotify\\.com/(?:[^/\\s\\[\\]]+/|)(?:track|artist|playlist|album|episode|show)/[a-zA-Z\\d_-]+(?:\\?[^\\s\\[\\]]{0,100}|)))|(?:(?i:https?://(?:anchor\\.fm|podcasters\\.spotify\\.com/pod/show)/[a-zA-Z\\d_-]+/episodes/[a-zA-Z\\d_-]+(?:/[a-zA-Z\\d_-]+)?(?:\\?[^\\s\\[\\]]{0,100}|)))|(?i:https?)://[^\\s\\[\\]]+\\.(?i:mp4|webm|mov)|(?i:https?)://[^\\s\\[\\]]*\\.(?i:wav|mp3|weba|ogg|aac))\\]"
741
+ },
742
+ {
743
+ "name": "markup.underline.link.media.cosense",
744
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?:(?i:https?)://[^\\s\\[\\]]+\\s+(?i:https?)://[^\\s\\[\\]]*\\.(?i:mp4|webm|mov)(?:\\?[^\\s\\[\\]]+)?|(?i:https?)://[^\\s\\[\\]]*\\.(?i:mp4|webm|mov)(?:\\?[^\\s\\[\\]]+)?\\s+(?i:https?)://[^\\s\\[\\]]+)\\]"
745
+ },
746
+ {
747
+ "name": "markup.underline.link.media.cosense",
748
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?i:https?)://[^\\s\\[\\]]*\\.(?i:wav|mp3|weba|ogg|aac)\\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*\\])[^\\[\\]]*\\]"
749
+ },
750
+ {
751
+ "name": "markup.underline.link.media.cosense",
752
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?!\\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+(?i:https?)://[^\\s\\[\\]]*\\.(?i:wav|mp3|weba|ogg|aac)\\])[^\\[\\]]+\\s(?i:https?)://[^\\s\\[\\]]*\\.(?i:wav|mp3|weba|ogg|aac)\\]"
694
753
  },
695
754
  {
696
755
  "name": "markup.underline.link.image.cosense",
697
- "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*\\]"
756
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)\\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*\\]"
698
757
  },
699
758
  {
700
759
  "name": "markup.underline.link.external.cosense",
701
- "match": "\\[[^\\[\\]]*(?i:https?)://[^\\s\\[\\]]+[^\\[\\]]*\\]"
760
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)[^\\[\\]]*(?i:https?)://[^\\s\\[\\]]+[^\\[\\]]*\\]"
702
761
  },
703
762
  {
704
763
  "name": "string.other.link.project.cosense",
705
- "match": "\\[/[^\\[\\]]*\\]"
764
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)/[^\\[\\]]*\\]"
706
765
  },
707
766
  {
708
767
  "name": "string.other.link.internal.cosense",
709
- "match": "\\[(?=[^\\[\\]]*[^\\s\\[\\]])[^\\[\\]]+\\]"
768
+ "match": "\\[(?!(?:\\[[^\\[\\]]*\\]|[^\\]\\x60])*\\x60.*\\x60)(?=[^\\[\\]]*[^\\s\\[\\]])[^\\[\\]]+\\]"
710
769
  },
711
770
  {
712
771
  "name": "markup.inline.raw.cosense",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosense-toolbox/textmate",
3
- "version": "0.1.0-beta.5",
3
+ "version": "0.1.0-beta.7",
4
4
  "type": "module",
5
5
  "description": "TextMate grammars for Cosense notation (.csn / .csnx), ready for Shiki and VS Code.",
6
6
  "license": "MIT",
@@ -44,7 +44,7 @@
44
44
  "effect": "^3.22.1"
45
45
  },
46
46
  "devDependencies": {
47
- "@cosense-toolbox/lsp": "0.1.0-beta.5",
47
+ "@cosense-toolbox/lsp": "0.1.0-beta.7",
48
48
  "shiki": "^4.4.3",
49
49
  "tsdown": "^0.22.14",
50
50
  "typescript": "^6.0.0",