fix: Endnotenverweise in HTML-Tabellen als HTML-Link ausgeben (QA2-04)
Mit --footnotes end-of-book wurde ein Verweis innerhalb einer als HTML erhaltenen Tabelle als Markdown-Link [n](…) geschrieben. In einem HTML-Block rendert Markdown nicht; der Verweis erschien als Rohtext. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
def1d8b5c0
commit
6be92645f4
1 changed files with 14 additions and 0 deletions
|
|
@ -74,3 +74,15 @@ def test_note_referenced_from_html_table_and_text_has_target(convert):
|
|||
assert 'href="#fn-001"' in text and "Text[^fn-001]." in text
|
||||
assert re.search(r'id="fn-001"', text), text
|
||||
assert run.report["output_link_check"]["broken_count"] == 0
|
||||
|
||||
|
||||
def _html_table(text: str) -> str:
|
||||
return text[text.index("<table"): text.index("</table>")]
|
||||
|
||||
|
||||
def test_end_of_book_reference_inside_html_table_is_html(convert):
|
||||
"""QA2-04: a Markdown link inside an HTML block is not rendered (shows up as literal text)."""
|
||||
run = convert(Book(docs=[Doc("c.xhtml", NOTE_IN_HTML_TABLE)]), "--footnotes", "end-of-book")
|
||||
table = _html_table(run.chapter("001"))
|
||||
assert "](" not in table, table
|
||||
assert '<a href="999-anmerkungen.md#fn-001">1</a>' in table
|
||||
|
|
|
|||
Loading…
Reference in a new issue