Skip to content

Commit e2a7a19

Browse files
committed
fix: link in plan line parses correctly as paragraph
1 parent 0d5e731 commit e2a7a19

File tree

4 files changed

+1652
-1609
lines changed

4 files changed

+1652
-1609
lines changed

corpus/basic.tst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2133,3 +2133,20 @@ Plan.15 - Expr
21332133
(timestamp
21342134
(date)
21352135
(expr))))))
2136+
2137+
================================================================================
2138+
Plan.16 - Link
2139+
================================================================================
2140+
* a
2141+
[[b]]
2142+
--------------------------------------------------------------------------------
2143+
2144+
(document
2145+
(section
2146+
(headline
2147+
(stars)
2148+
(item
2149+
(expr)))
2150+
(body
2151+
(paragraph
2152+
(expr)))))

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ org_grammar = {
174174
alias(/\p{N}?\p{N}[:.]\p{N}\p{N}( ?\p{L}{1,2})?-\p{N}?\p{N}[:.]\p{N}\p{N}( ?\p{L}{1,2})?/, $.duration),
175175
alias(/[.+]?\+\p{N}+\p{L}/, $.repeat),
176176
alias(/--?\p{N}+\p{L}/, $.delay),
177-
alias(prec(-1, /[^\]>\p{Z}\n\r]+/), $.expr),
177+
alias(prec(-1, /[^\[<\]>\p{Z}\n\r]+/), $.expr),
178178
),
179179

180180
paragraph: $ => seq(optional($._directive_list), $._multiline_text),

src/grammar.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@
842842
"value": -1,
843843
"content": {
844844
"type": "PATTERN",
845-
"value": "[^\\]>\\p{Z}\\n\\r]+"
845+
"value": "[^\\[<\\]>\\p{Z}\\n\\r]+"
846846
}
847847
},
848848
"named": true,

0 commit comments

Comments
 (0)