Skip to content

Fenced div close ::: immediately after a pipe table fails to parse #206

@rundel

Description

@rundel

A ::: line that closes a fenced div fails to parse when it sits directly under a pipe table with no intervening blank line. Inserting a blank line between the table and ::: makes the same input parse. Other block successors (headings, paragraphs) immediately following a pipe table parse fine — the bug is specific to :::. Likely the pipe-table parser consumes the ::: line as a table-continuation candidate, then errors when the lex of ::: doesn't match what a table cell row should be.

If this is expected syntax (blank line required) then a more informative / located error message would be helpful.

$ printf -- '::: foo\n|   |   |\n|:-:|:-:|\n| a | b |\n:::\n' | cargo run --bin pampa -- 2>&1

Error: Parse error
   ╭─[ <stdin>:5:2 ]
   │
 5 │ :::
   │  ┬
   │  ╰── unexpected character or token here
───╯

$ printf -- '::: foo\n|   |   |\n|:-:|:-:|\n| a | b |\n\n:::\n' | cargo run --bin pampa -- 2>&1

[ Div ( "" , ["foo"] , [] ) [Table ... ] ]

In-the-wild:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions