Documents: \( pairs stay in one paragraph and off addresses; formulas place at wraps
- 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:
7 files changed
+524
-131
No files matched your search
@@ -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
|
||||
&& ["$$", "\\["]
|
||||
|
||||
Reference in new issue
Block a user