Skip to content

fix(markdown): keep line blocks, labels, citations, and example items whole - #516

Merged
HaoZeke merged 6 commits into
mainfrom
fix/markdown-more-spans
Sep 26, 2026
Merged

HaoZeke merged 6 commits into
mainfrom
fix/markdown-more-spans

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

A Pandoc line that starts with | and has no closing pipe was reflowed as prose.

A shortcut reference label, a Pandoc citation, and $...$ math with a period inside were reflowed as prose.

An (@) example item was reflowed as prose.

The line, the label, the citation, and the math stay one span. The example marker stays on the item line, and the second sentence hangs under it. A sentence outside each span still splits.

A `| ` line with no closing pipe is a line block, not prose, so an
interior period does not split it. `(@)` is a list marker: the second
sentence hangs under the item instead of leaving it. Flanking-pipe
rows stay tables.
A shortcut reference whose label holds a sentence boundary stays one
span, as does a Pandoc [@key] citation. Dollar math may close on a
period. A sentence outside each span still splits.
The regex crate rejects look-around, so a shortcut label is one span
when it contains a sentence boundary. [fn:1] has none, and cite and
inline footnotes still match their earlier arms.
(@) is a list marker in the parser, but the reflow hang only knew
bullets and ordered markers, so the next sentence dropped to column 0.
The line block is one structure region, including its newline.
@HaoZeke
HaoZeke merged commit 7dd7786 into main Sep 26, 2026
24 checks passed
@HaoZeke
HaoZeke deleted the fix/markdown-more-spans branch September 26, 2026 10:47
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