Documents: \( pairs stay in one paragraph and off addresses; formulas place at wraps
CI / site (push) Successful in 36s
CI / platforms (windows-latest) (push) Successful in 4m49s
CI / crate (push) Failing after 11m31s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

- Pairs pair inside one paragraph, heading or cell; links' addresses,
  images, code and <code>/<kbd> text stay literal.
- Adjacent formulas stay two; a parting space is dropped after parsing.
- Stray and escaped dollars, in or out of a formula, stay dollars.
- A formula's node spans its delimiters; its value is the written TeX.
- A formula wrapped whole draws at its own line's start.
- A failed inline formula shows its reason after the TeX.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude committed 2026-10-18 23:54:39 -04:00
1 parent e095f06689
commit a20e712e29
7 files changed
+524 -131

No files matched your search

+2 -2
View File
@@ -6,7 +6,7 @@ use super::markdown::{span, tree, walk};
mod blocks;
mod emoji;
mod html;
pub(crate) mod html;
mod html_block;
mod sources;
mod stack;
@@ -318,7 +318,7 @@ impl<'a> Reader<'a> {
}
}
/// Text split at its images; lone `$$` or `\[` math is block.
/// Text splits at images; a lone formula is block.
fn paragraph(&self, node: &mdast::Node, children: &[mdast::Node], out: &mut Vec<Node>) {
if let [mdast::Node::InlineMath(math)] = children
&& ["$$", "\\["]