Fix markdown parser crash on emphasized text inside HTML tags#2166
Merged
UlrichB22 merged 1 commit intoFeb 23, 2026
Merged
Conversation
Collaborator
|
@apoorvdarshan, thanks for your support of the moin2 project. There has been a lint failure for markdown_in.py. Can you have a look at the logs? We recommend installing the pre-commit hook as described in the development documentation to avoid failed checks, please see https://moin-20.readthedocs.io/en/latest/devel/development.html#install-pre-commit-hooks |
…ki#1838) Reassemble raw HTML tags that get split by markdown's inline pattern processor when inline syntax (e.g. _emphasis_) appears inside HTML tags (e.g. <del>), preventing IndexError crash in convert_embedded_markup.
d504946 to
9a89c00
Compare
0e960bd to
9a89c00
Compare
Contributor
Author
|
Thanks for the review! I've fixed the black formatting issue in the test file and force-pushed the fix. |
gmilde
added a commit
to gmilde/moin
that referenced
this pull request
Feb 25, 2026
Additional tests for PR moinwiki#2166 Some valid use cases still fail. TODO: fix behaviour and move samples to the non-failing tests.
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.
Summary
IndexError: pop from empty listwhen markdown like* <del>Deleted list item with _emphasized text_</del>is renderedconvert_embedded_markupprocesses them<del>,<ins>, and<kbd>with inline markdown emphasis/strong, plus a regression test for non-split HTML tagsTest plan