fix(markdown): keep line blocks, labels, citations, and example items whole - #516
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.