fix: parsing table cell content of "-"

This commit is contained in:
Emilia Simmons 2022-05-02 16:42:08 -04:00
parent fab7af32a2
commit e40131e544
4 changed files with 4767 additions and 4764 deletions

View file

@ -1414,6 +1414,22 @@ Table.10 - Multiline
(contents
(expr)))))))
================================================================================
Table.11 - Cell contents with '-'
================================================================================
| - |
--------------------------------------------------------------------------------
(document
(body
(table
(row
(cell
(contents
(expr)))))))
================================================================================
Headlines.1a - No eols
================================================================================

View file

@ -269,7 +269,7 @@ org_grammar = {
optional(field('contents', alias($._expr_line, $.contents)))),
hr: $ => seq(
token(prec(1, '|')),
repeat1(seq(token(prec(1, /[-+]+/)), optional('|'))),
repeat1(seq(token.immediate(prec(1, /[-+]+/)), optional('|'))),
$._eol,
),

View file

@ -1508,7 +1508,7 @@
"type": "SEQ",
"members": [
{
"type": "TOKEN",
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PREC",
"value": 1,

File diff suppressed because it is too large Load diff