|
3 | 3 | "name": "xit!",
|
4 | 4 | "patterns": [
|
5 | 5 | {
|
6 |
| - "include": "#open-items" |
7 |
| - }, |
8 |
| - { |
9 |
| - "include": "#closed-items" |
| 6 | + "include": "#item" |
10 | 7 | },
|
11 | 8 | {
|
12 | 9 | "include": "#title"
|
13 |
| - }, |
14 |
| - { |
15 |
| - "include": "#nextline-description" |
16 | 10 | }
|
17 | 11 | ],
|
18 | 12 | "repository": {
|
19 | 13 | "title": {
|
20 | 14 | "name": "markup.underline.xit, markup.other.task.title.xit",
|
21 | 15 | "match": "^[^\\s].*"
|
22 | 16 | },
|
23 |
| - "nextline-description": { |
24 |
| - "match": "^ .+" |
| 17 | + "item": { |
| 18 | + "patterns": [ |
| 19 | + { |
| 20 | + "include": "#open-item" |
| 21 | + }, |
| 22 | + { |
| 23 | + "include": "#closed-item" |
| 24 | + } |
| 25 | + ] |
25 | 26 | },
|
26 |
| - "open-items": { |
27 |
| - "begin": "^(?:(\\[ ?\\])|(\\[@\\]))(?= |$)", |
| 27 | + "open-item": { |
| 28 | + "begin": "^(?:(\\[ *\\])|(\\[@\\]))[^\\S\\n]*(.*(?= |$))", |
28 | 29 | "beginCaptures": {
|
29 | 30 | "1": {
|
30 | 31 | "name": "variable.function.xit, markup.other.task.checkbox.open.xit"
|
|
33 | 34 | "name": "storage.type.xit, markup.other.task.checkbox.ongoing.xit"
|
34 | 35 | }
|
35 | 36 | },
|
36 |
| - "end": "\\n", |
37 |
| - "patterns": [ |
38 |
| - { |
39 |
| - "include": "#description" |
| 37 | + "while": " (.+)", |
| 38 | + "whileCaptures": { |
| 39 | + "1": { |
| 40 | + "patterns": [ |
| 41 | + { |
| 42 | + "include": "#item-description" |
| 43 | + } |
| 44 | + ] |
40 | 45 | }
|
41 |
| - ] |
| 46 | + } |
42 | 47 | },
|
43 |
| - "closed-items": { |
44 |
| - "begin": "^(?:(\\[x\\])|(\\[~\\]))(?= |$)", |
| 48 | + "closed-item": { |
| 49 | + "begin": "^(?:(\\[x\\])|(\\[~\\]))[^\\S\\n]*(.*(?= |$))", |
45 | 50 | "beginCaptures": {
|
46 | 51 | "1": {
|
47 |
| - "name": "markup.strikethrough.xit, markup.inserted.xit, markup.other.task.checkbox.checked.xit" |
| 52 | + "name": "markup.inserted.xit, markup.other.task.checkbox.checked.xit" |
48 | 53 | },
|
49 | 54 | "2": {
|
50 |
| - "name": "comment.xit, markup.strikethrough.xit, markup.other.task.checkbox.obsolete.xit" |
| 55 | + "name": "comment.xit, markup.other.task.checkbox.obsolete.xit" |
| 56 | + }, |
| 57 | + "3": { |
| 58 | + "name": "comment.xit, markup.strikethrough.xit" |
51 | 59 | }
|
52 | 60 | },
|
53 |
| - "end": "\\n", |
54 |
| - "contentName": "comment.line.xit, markup.strikethrough.xit, markup.other.task.description.closed.xit", |
55 |
| - "patterns": [ |
56 |
| - { |
57 |
| - "include": "#description" |
| 61 | + "while": " (.+)", |
| 62 | + "whileCaptures": { |
| 63 | + "1": { |
| 64 | + "name": "comment.xit, markup.strikethrough.xit", |
| 65 | + "patterns": [ |
| 66 | + { |
| 67 | + "include": "#item-description" |
| 68 | + } |
| 69 | + ] |
58 | 70 | }
|
59 |
| - ] |
| 71 | + } |
60 | 72 | },
|
61 |
| - "description": { |
| 73 | + "item-description": { |
62 | 74 | "patterns": [
|
63 |
| - { |
| 75 | + { |
64 | 76 | "match": "(?<=^\\[[ x@~]\\] )(?:(?:!+\\.*)|(?:\\.*!+))",
|
65 | 77 | "name": "markup.deleted.xit, markup.other.task.priority.xit"
|
66 | 78 | },
|
|
0 commit comments