Repository navigation
Conversation
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.
Fixes #269.
The malformed prefix alternative in URL_REGEX excludes explicit reST hyperlink targets. A long target can consequently be split away from its URL, producing invalid markup.
This separates the inline-link and explicit-target alternatives, restores periods in inline labels, and keeps the target underscore mandatory. The angle-bracket lookahead prevents an earlier reference from being consumed with a later anonymous URL, preserving the behavior covered by #75 and #210.
Adds 18 parametrized cases covering complete link spans, non-link text, unrelated markup, long targets at module/function indentation, and formatting idempotence. Seven of those cases fail before the fix.
Validation on Python 3.12.14:
Related prior work: #324 included a similar regex correction in a broader change; this keeps the fix focused on #269 with regression coverage.