"#), "the closer's attribute list attaches to the math block");
assert_eq!(reparsed.meta, document.meta);
let code = render(&parse("```python\nx = 1\n```\n\n```md\n# Title\n```", &options));
let (html, warnings) = export_html(&code, &HtmlExportOptions { hl: Some(HlMode::Spans), ..Default::default() }).unwrap();
diff --git a/tests/test_export.py b/tests/test_export.py
index bccefcb..091be02 100644
--- a/tests/test_export.py
+++ b/tests/test_export.py
@@ -443,3 +443,63 @@ def test_lenient_refs_resolve_what_they_can():
exhibit = md2mdhtml('## Proof {#exh-proof}\n\nSee [@exh-proof].')
with pytest.raises(ValueError): mdhtml2html(exhibit)
assert 'Exhibit 1' in mdhtml2html(exhibit, reftypes=dict(exh=('Exhibit', 'Exhibits')))
+
+
+EQUATIONS = r'''## Model {#sec-model}
+
+\[
+E = mc^2
+\]{#eq-energy}
+
+\[
+F = ma
+\]
+{: #eq-force}
+
+\[
+x = y
+\]
+
+::: callout-note
+\[
+a = b
+\]{#eq-note}
+:::
+
+> \[
+> c = d
+> \]{#eq-quoted}
+
+See [@eq-energy], [-@eq-force], [@eq-energy; @eq-force], [@eq-note], and [@eq-quoted].
+'''
+
+
+def test_equation_numbering():
+ doc = md2mdhtml(EQUATIONS)
+ assert not doc.warnings
+ assert '
E = mc^2
' in doc # the closer carries the attribute list
+ html = mdhtml2html(doc, number_headings=False)
+ assert 'E = mc^2\n\\tag{1}
' in html and 'F = ma\n\\tag{2}' in html and 'x = y' in html
+ assert 'a = b\n\\tag{3}' in html and 'c = d\n\\tag{4}' in html
+ assert '