mirror of
https://github.com/zensical/zensical.git
synced 2026-08-25 08:36:45 +00:00
fix: anchors with escaped chars not matched during link validation (#703)
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
This commit is contained in:
@@ -1446,6 +1446,15 @@ class TestFootnoteReferences:
|
||||
assert text(md, link_refs[0].text) == expected_id
|
||||
assert text(md, link_refs[0].id) == expected_id
|
||||
|
||||
def test_no_footnote_ref_escaped_id(self) -> None:
|
||||
md = b"[^a\\_b]\n\n[^a_b]: note"
|
||||
refs = collect(md)
|
||||
assert len(refs) == 1
|
||||
|
||||
note_defs = footnote_defs_only(refs)
|
||||
assert len(note_defs) == 1
|
||||
assert text(md, note_defs[0].id) == b"a_b"
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user