Repository navigation
fix(markdown): keep bracket math and div fences whole - #510
Merged
Merged
Conversation
\[ ... \] is display math, same as $$, so a sentence inside it stays one structure block. A pandoc ::: fence stays structure while prose inside the div still reflows, and a sentence cannot cross the fence.
An opener without \] stays prose. The following paragraph still reflows. The open bracket is not a sentence boundary by itself.
A blank line ends the unclosed opener. The next paragraph stays prose and still splits.
A line of three or more colons matches the definition-list colon with no spaces after it, so the paragraph above becomes a title. A pandoc fence is not that marker.
A later \] is not a closer once a blank line has ended the opener. The middle paragraph stays prose and still splits. A \[ ... \] block with no blank line between stays structure.
Markdown reuses the LaTeX non-prose and code-environment names, so subequations, dmath, multlined, loglogaxis, tikzpicture*, and matrix* are not sentence-split. Prose outside the body still splits.
The blank-line bracket search stays, and dmath* stays on the non-prose list next to the markdown environment names.
fix(markdown): keep LaTeX non-prose environments whole
…pper into fix/markdown-math-div
The axis names from main stay on the non-prose list next to the markdown environment names.
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.
Markdown
\[/\]display math was reflowed as prose.A pandoc
:::fence was reflowed as prose, and a fence could be read as a definition marker.Bracket math now stays structure, the same way
$$does. An unclosed\[stays prose.The fence stays structure. Prose inside the div still splits. A sentence does not cross the fence.