fix: Zeilen aus nur - oder = als Text maskieren (QA2-08)
Ein Absatz "---" wurde zur Trennlinie, "===" bzw. "---" nach einem Zeilenumbruch machte die vorige Zeile zur Setext-Überschrift. Solche Zeilen erhalten jetzt einen Backslash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ff1a0ae5e4
commit
daa99415b5
1 changed files with 12 additions and 0 deletions
|
|
@ -109,6 +109,15 @@ def test_multiple_blank_lines_inside_code_are_kept(convert):
|
|||
assert "\n\n\n" not in text.replace(code, "") # outside code blank lines are still normalized
|
||||
|
||||
|
||||
def test_dash_and_equals_lines_stay_text(convert):
|
||||
"""QA2-08: a paragraph '---' became a thematic break, '===' after a line break a setext heading."""
|
||||
body = "<h1>K</h1><p>---</p><p>Zeile<br/>===</p><p>Text<br/>-----</p>"
|
||||
text = convert(Book(docs=[Doc("c.xhtml", body)])).chapter("001")
|
||||
assert "\n\\---\n" in text, text
|
||||
assert "Zeile\\\n\\===" in text, text
|
||||
assert "Text\\\n\\-----" in text, text
|
||||
|
||||
|
||||
def _simple() -> Book:
|
||||
return Book(docs=[Doc("c.xhtml", "<h1>K</h1><p>Text.</p>")])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue