fix: Seitenmarken aus Kastentiteln vor den Kasten setzen; <mark> dokumentiert

- Marken im Kastentitel landen über marker_sink vor dem Kasten (wie bei
  Überschriften) statt im fetten Titel ("**\[S. 62\]Wozu …**")
- Doku: --no-css-emphasis lässt <mark> bestehen, das steuert --styles

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Dieter Schlüter 2026-10-06 05:41:55 +02:00
commit 6e3d05fef1

View file

@ -201,3 +201,11 @@ def test_hidden_span_gets_no_field_separator_and_class_type_wins(convert):
text = convert(Book(docs=[Doc("c.xhtml", body)], media={"s.css": css})).chapter("001")
assert "<u>unterstrichen</u>." in text and "VERSTECKT" not in text
assert "> [!NOTE]\n> **Wichtige Regel**" in text # class 'hinweis' beats the word in the title
def test_page_marker_in_box_title_goes_before_the_box(convert):
body = ('<h1>K</h1><div class="box"><h3 class="boxheading"><a id="page_62"/>Wozu Deklarationen?</h3>'
'<p>Weil es <a id="page_63"/>hilft.</p></div>')
text = convert(Book(docs=[Doc("c.xhtml", body)]), "--page-markers", "visible").chapter("001")
assert "\\[S. 62\\]\n\n> [!NOTE]\n> **Wozu Deklarationen?**" in text
assert "> Weil es \\[S. 63\\]hilft." in text # markers in the box body stay in place