fix: regression reporting unresolved references (#866)

Signed-off-by: squidfunk <martin.donath@squidfunk.com>
This commit is contained in:
Martin Donath
2026-08-17 18:33:03 +02:00
committed by GitHub
parent b60354ccb3
commit 9973ac981b
2 changed files with 4 additions and 5 deletions
+4
View File
@@ -1624,6 +1624,10 @@ class TestFencedCodeBlocks:
b"``` python\n[text](href)\n```",
id="fenced-code-3-backticks-lang",
),
pytest.param(
b"```text\n[text](href)\n\nline two\n```",
id="fenced-code-3-backticks-lang-without-space",
),
pytest.param(
b"````\n[text](href)\n````",
id="fenced-code-4-backticks",
@@ -220,17 +220,12 @@ def _scan(cursor: Cursor) -> Iterator[Reference]:
if (
cursor.at_line_start()
and count >= 3 # noqa: PLR2004
and cursor.peek(count) in (_SPACE, _TAB, _CR, _NL, -1)
):
end = _scan_fenced_code(cursor, _BACKTICK)
if end is not None:
cursor.advance(end - cursor.pos)
continue
# Literal
cursor.advance(count)
continue
# Inline code: `...`
end = _scan_inline_code(cursor)
if end is not None: