Skip to content

Fix link patterns inside wrapped Markdown labels - #747

Open
nk-batman21 wants to merge 1 commit into
trentm:masterfrom
nk-batman21:fix-multiline-link-patterns
Open

nk-batman21 wants to merge 1 commit into
trentm:masterfrom
nk-batman21:fix-multiline-link-patterns

Conversation

@nk-batman21

Copy link
Copy Markdown

With link-patterns enabled, a wrapped Markdown link label can gain a nested anchor. An image with a wrapped alt label can instead display escaped anchor markup in its alt text.

Let the existing inline-link exclusion span label newlines, bounded by the core link parser's label limit. Extend the Markdown syntax fixture with wrapped links, images, nested brackets, and automatic links before and after them.

  • Ran: full native test suite, 296 tests on Python 3.9, 3.13, and 3.14 with all optional dependencies.
  • Ran: python test/test_redos.py, 12 tests.
  • Checked: new fixture fails before the fix; 168 link/image comparisons and changed-line PEP8 pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant