Fix check for markdown links number mismatch

This commit is contained in:
Yurii Motov 2026-01-06 08:26:08 +01:00
parent 5c50b3dd15
commit 5ca9472d8a
1 changed files with 2 additions and 2 deletions

View File

@ -315,9 +315,9 @@ def replace_markdown_links(
Fail if the number of links does not match the original.
"""
if len(links) > len(original_links):
if len(links) != len(original_links):
raise ValueError(
"Number of markdown links exceeds number of markdown links in the "
"Number of markdown links does not match the number in the "
"original document "
f"({len(links)} vs {len(original_links)})"
)