"""Regression tests for the remaining findings of the independent QA (QA2-09 … QA2-19)."""
import re
from conftest import PNG, SVG, Book, Doc
M = 'xmlns="http://www.w3.org/1998/Math/MathML"'
def html_table(text: str) -> str:
return text[text.index("
")]
def test_qa2_09_math_and_notes_in_html_tables_are_html(convert):
body = ('T
| Kopf |
'
f' | '
' '
'1 |
'
'')
for mode in ("auto", "tex"):
run = convert(Book(docs=[Doc("c.xhtml", body)], media={"f.png": PNG}), "--math", mode, "--footnotes", "inline")
table = html_table(run.chapter("001"))
visible = re.sub(r'"[^"]*"', '""', table) # ignore attribute values (alt texts)
assert "