"""Regression tests for defects found in the independent QA run (.qa/QA_REPORT.md, IDs QA2-…).""" import re from conftest import Book, Doc def _pipe_rows(text: str) -> list[str]: return [ln for ln in text.splitlines() if ln.startswith("| ")] def test_pipe_in_inline_code_does_not_split_gfm_table(convert): """QA2-01: GFM splits table cells at every unescaped '|', also inside code spans and link targets.""" body = ("

Operatoren

" "" "" "
OperatorBedeutung
||logisches ODER
a | bLink
") run = convert(Book(docs=[Doc("c.xhtml", body)])) text = run.chapter("001") for row in _pipe_rows(text): cells = re.split(r"(?