File tree Expand file tree Collapse file tree 3 files changed +12625
-12601
lines changed Expand file tree Collapse file tree 3 files changed +12625
-12601
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ org_grammar = {
36
36
// Should we start the tag?
37
37
[ $ . item ] ,
38
38
39
+ [ $ . _tag_expr_start , $ . expr ] ,
40
+
39
41
// _multiline_text • ':' …
40
42
// Is the ':' continued multiline text or is it a drawer?
41
43
[ $ . paragraph ] ,
@@ -112,13 +114,16 @@ org_grammar = {
112
114
item : $ => repeat1 ( $ . expr ) ,
113
115
114
116
tag_list : $ => prec . dynamic ( 1 , seq (
115
- token ( prec ( 'non-immediate' , ':' ) ) ,
117
+ $ . _tag_expr_start ,
116
118
repeat1 ( seq (
117
119
field ( 'tag' , alias ( $ . _noc_expr , $ . tag ) ) ,
118
120
token . immediate ( prec ( 'special' , ':' ) ) ,
119
121
) ) ,
120
122
) ) ,
121
123
124
+ // This is in another node to ensure a conflict with headline (item)
125
+ _tag_expr_start : _ => token ( prec ( 'non-immediate' , ':' ) ) ,
126
+
122
127
property_drawer : $ => seq (
123
128
caseInsensitive ( ':properties:' ) ,
124
129
repeat1 ( $ . _nl ) ,
Original file line number Diff line number Diff line change 330
330
"type" : " SEQ" ,
331
331
"members" : [
332
332
{
333
- "type" : " TOKEN" ,
334
- "content" : {
335
- "type" : " PREC" ,
336
- "value" : " non-immediate" ,
337
- "content" : {
338
- "type" : " STRING" ,
339
- "value" : " :"
340
- }
341
- }
333
+ "type" : " SYMBOL" ,
334
+ "name" : " _tag_expr_start"
342
335
},
343
336
{
344
337
"type" : " REPEAT1" ,
375
368
]
376
369
}
377
370
},
371
+ "_tag_expr_start" : {
372
+ "type" : " TOKEN" ,
373
+ "content" : {
374
+ "type" : " PREC" ,
375
+ "value" : " non-immediate" ,
376
+ "content" : {
377
+ "type" : " STRING" ,
378
+ "value" : " :"
379
+ }
380
+ }
381
+ },
378
382
"property_drawer" : {
379
383
"type" : " SEQ" ,
380
384
"members" : [
4171
4175
[
4172
4176
" item"
4173
4177
],
4178
+ [
4179
+ " _tag_expr_start" ,
4180
+ " expr"
4181
+ ],
4174
4182
[
4175
4183
" paragraph"
4176
4184
],
You can’t perform that action at this time.
0 commit comments