pub fn join_multiline_math(content: &str) -> StringExpand description
Fold every $$…$$ span that crosses a line break onto one line, leaving
fenced code blocks alone.
CommonMark reads the lines of a display formula as block syntax — Z[J]
over a lone = is a setext heading, a line opening with + c is a list
item — and pulldown-cmark’s math cannot cross a block boundary, so the
formula fell apart into escaped text. Whitespace is insignificant to LaTeX,
so the span is the same formula on one line, which pulldown-cmark reads as
display math whole.