Repository navigation
Conversation
|
🛡️ Human Attestation required. A human needs to confirm this PR once before it can merge. Attest this PR — sign in with GitHub, pass the challenge, and confirm one of the statements. |
Owner
|
@Enesuygurs please resolve conflicts |
…rens-link-destination # Conflicts: # tests/test_basic.py
Contributor
Author
|
Resolved the conflict with #291 by merging master in; the new tests sit next to the CDATA and declaration tests, and the full suite passes. |
frostming
approved these changes
Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A link destination that isn't wrapped in
<...>may only contain parentheses that are backslash-escaped or part of a balanced pair (spec §6.3; link reference definitions use the same rule, §4.7)._parse_link_dest_titlecounted open parentheses but never checked that they were all closed when the destination ended at whitespace or at the end of the input. As a result:[a]: /u(was accepted as a link reference definition. The line disappeared from the output, and[a]elsewhere became a link to/u(.[a](/u( "t")was rendered as a link with a title.Both are now left as plain text, which matches cmark, commonmark.js and markdown-it. Balanced cases such as
[a](foo(and(bar)))still produce links.The bundled spec examples only cover an unclosed parenthesis that runs up to the closing
), which is why the existing tests didn't catch this. I added regression tests for the reference definition and the inline case. They fail without the change, and the full test suite passes.