Skip to content

fix: two missed Markdown splits and table rows - #528

Merged
HaoZeke merged 2 commits into
mainfrom
fix/markdown-split-gaps
Oct 11, 2026
Merged

HaoZeke merged 2 commits into
mainfrom
fix/markdown-split-gaps

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

Two follow-ups to #524 and #526, each with a regression test.

  • A with no `''` after it held a LaTeX quote open, so the rest of the paragraph stayed on one line. The delimiter walk now opens a quote only when a closer is left, as CommonMark reads an unmatched backtick run as literal. `Unclosed tick here. Next sentence.` now splits.
  • A pipe-less line under the last table row is a body row (GFM ex. 202, and pulldown-cmark agrees).
    snapper split it as prose and the CLI render check reverted it with a warning.
    The table now runs to a blank line or a block that interrupts a paragraph.
    A list item, heading, fence, quote, HTML block, footnote or a line indented less than the header still ends it.

heavy_table_still_interrupts expected that line to split, so it now checks the row and a later paragraph.
The new tests fail on main and pass here.
cargo test, cargo clippy -- -D warnings and cargo fmt --check pass.

A `` with no '' after it held a LaTeX quote open to the end of the paragraph.
Every later sentence stayed on its line.
CommonMark reads an unmatched backtick run as literal text.
The delimiter walk now counts the '' closers ahead and opens a quote only when one is left to close it.
A closed ``quote'' still keeps its sentences together.
A GFM table runs to a blank line or to a block that interrupts a paragraph (GFM ex. 202).
A line under the last row with no pipe is one more row.
The parser read it as prose and split it, which added a row.
The CLI render check then reverted that line with a warning.
The table now takes such lines, as pulldown-cmark does.
A list item, heading, fence, quote, HTML block or footnote ends it.
A line indented less than the header ends it too, since it may belong to an outer container.
The light-table test expected the split, so it now checks the row and a later paragraph.
@HaoZeke
HaoZeke merged commit 284efb2 into main Oct 11, 2026
26 checks passed
@HaoZeke
HaoZeke deleted the fix/markdown-split-gaps branch October 11, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant