test: cover multiline math with soft-break rewrite

This commit is contained in:
2026-10-27 11:56:52 +08:00
parent 968e89bf98
commit 53c39af0c8
3 changed files with 13 additions and 4 deletions

View File

@@ -2174,6 +2174,15 @@ mod tests {
assert!(!html.contains("<em>"));
}
#[test]
fn multiline_display_math_is_not_split_by_hard_breaks() {
let html = md_to_html("$$\na + b\n$$");
assert!(html.contains(r#"class="math math-display""#), "{html}");
assert!(html.contains("a + b"), "{html}");
assert!(!html.contains("<br />"), "{html}");
}
#[test]
fn github_alerts_render_as_markdown_alert_blockquotes() {
let html = md_to_html("> [!IMPORTANT]\n> This is an alert");