Repository navigation
Comparing changes
Open a pull request
base repository: lepture/mistune
base: v3.3.2
head repository: lepture/mistune
compare: v3.3.3
- 20 commits
- 22 files changed
- 6 contributors
Commits on Jun 17, 2026
-
Fix MarkdownRenderer re-rendering of code spans containing backticks
MarkdownRenderer.codespan always wrapped the content in a single backtick pair, so a code span whose content contains backticks re-parsed wrong: the inner backtick closed the span early, and a lone backtick rendered as an empty fenced code block. Size the delimiter to one more than the longest backtick run in the content, and pad with a space on each side when the content begins or ends with a backtick (the parser strips that padding back off), matching parse_codespan and CommonMark.
Configuration menu - View commit details
-
Copy full SHA for f6827e8 - Browse repository at this point
Copy the full SHA f6827e8View commit details
Commits on Jun 25, 2026
-
fix(inline): use original run length in emphasis multiple-of-3 rule
CommonMark rules 9 and 10 require the multiple-of-3 delimiter test to use the lengths of the original delimiter runs, not the lengths remaining after a run has been partially consumed. mistune mutated _Delimiter.length as it consumed markers and then reused that mutated value in the mod-3 test, so the leftover of a partially consumed run (e.g. the ** left after *a* closes in '*a***a*') could no longer match a later delimiter. Track the original run length on _Delimiter and use it in _can_match_emphasis_delimiters. Fixes cases such as '*a***a*' and '*foo***bar*', which two CommonMark reference implementations (markdown-it-py, commonmark.py) render as <em>a</em>*<em>a</em> and <em>foo</em>*<em>bar</em>. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2d26bc8 - Browse repository at this point
Copy the full SHA 2d26bc8View commit details
Commits on Jun 26, 2026
-
Merge pull request #458 from greymoth-jp/fix/emphasis-mod3-original-l…
…ength Fix emphasis multiple-of-3 rule mis-rendering (e.g. *foo***bar*)
Configuration menu - View commit details
-
Copy full SHA for fc15c87 - Browse repository at this point
Copy the full SHA fc15c87View commit details -
Merge pull request #450 from gaoflow/fix-markdown-codespan-backticks
Fix MarkdownRenderer re-rendering of code spans containing backticks
Configuration menu - View commit details
-
Copy full SHA for 10c918d - Browse repository at this point
Copy the full SHA 10c918dView commit details -
fix: set prev token in render_list_item and add block_text to ignore_…
…blocks (#456) * fix: set prev token in render_list_item and add block_text to ignore_blocks The RSTRenderer.block_quote method accesses token.prev to decide whether to emit a .. separator before the blockquote. When a blockquote appears inside a list item, render_list_item called renderer.render_token directly without tracking prev, so blockquote tokens never received a prev reference. This caused a KeyError in older versions and silently degraded output in the current version (missing or incorrect .. separators). - Track prev in render_list_item, mirroring how RSTRenderer.iter_tokens already does for top-level tokens. - Add block_text (the list-internal paragraph token type) to the ignore_blocks tuple so a blockquote following list-internal text does not get a spurious .. separator. * Test RST list item blockquote separation
Configuration menu - View commit details
-
Copy full SHA for 0799e19 - Browse repository at this point
Copy the full SHA 0799e19View commit details
Commits on Jun 27, 2026
-
Escape quotes in MarkdownRenderer link and image titles
A title containing a double quote was emitted unescaped inside double quotes, e.g. [t](/u 'a"b') re-rendered as [t](/u "a"b"). On a re-parse the embedded quote closes the title early, so the title is silently dropped (or the link fails to parse). Escape backslashes and the closing quote when writing inline-link, image and reference-link titles so they survive a round trip.
Configuration menu - View commit details
-
Copy full SHA for 2c1a518 - Browse repository at this point
Copy the full SHA 2c1a518View commit details -
Merge pull request #459 from sarathfrancis90/fix/markdown-renderer-li…
…nk-title-quote Escape quotes in MarkdownRenderer link and image titles
Configuration menu - View commit details
-
Copy full SHA for ecd435a - Browse repository at this point
Copy the full SHA ecd435aView commit details
Commits on Jun 28, 2026
-
Keep a trailing '>' when reformatting block quotes
MarkdownRenderer.block_quote indented every line with '> ' (including the blank line a paragraph leaves behind) and then ran rstrip('> \n') to drop that dangling marker. Because rstrip strips a character set, it also ate a '>' that ended the quote's own content, so an autolink, an inline HTML tag, or a literal '>' lost its final character (e.g. '> <https://x.com>' became '> <https://x.com', which reparses as escaped text). Strip the children's trailing blank lines before indenting instead, so the marker is never added to an empty trailing line and there is nothing to peel back off.Configuration menu - View commit details
-
Copy full SHA for cff35d5 - Browse repository at this point
Copy the full SHA cff35d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 59c35e2 - Browse repository at this point
Copy the full SHA 59c35e2View commit details
Commits on Jul 3, 2026
-
Configuration menu - View commit details
-
Copy full SHA for fe02f40 - Browse repository at this point
Copy the full SHA fe02f40View commit details -
fix: escape literal emphasis markers in MarkdownRenderer
MarkdownRenderer.text() only escaped backticks, so a text token that is a literal "*"/"_" emphasis delimiter was emitted unescaped and re-parsed as emphasis on the round-trip. This silently changed the document's meaning, violating the invariant asserted by TestMarkdownRendererRoundTrip ("reformatting valid Markdown must not change its meaning"). An escaped marker in the source (``\*not emphasis\*``) is stored by the inline parser as bare "*" text tokens (the backslash is consumed and the parser's internal no-emphasis flag is dropped before the AST). Re-emitting those tokens without a backslash let them pair up again: reformat(r"\*not emphasis\*") -> "*not emphasis*" html(reformat(...)) -> "<p><em>not emphasis</em></p>" # was <p>*not emphasis*</p> The same happened for "_", "**"/"__", and unmatched leftover markers. Fix: in text(), if a text token consists entirely of "*"/"_" it is a literal delimiter (an escaped marker or an unmatched leftover), so backslash-escape each character. Prose punctuation such as "2 * 3" or "snake_case" always arrives mixed with other characters, so it is left untouched and is not over-escaped (guarded by the existing test_prose_not_over_escaped and a new test_real_emphasis_not_over_escaped). Added test_escaped_emphasis_markers and test_real_emphasis_not_over_escaped to TestMarkdownRendererRoundTrip. The regression test fails without the source change (asserts <em>...</em> reappears) and passes with it; full suite 1122 passed, ruff check/format and mypy clean.Configuration menu - View commit details
-
Copy full SHA for b042996 - Browse repository at this point
Copy the full SHA b042996View commit details
Commits on Jul 4, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 3025549 - Browse repository at this point
Copy the full SHA 3025549View commit details
Commits on Jul 8, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 4009f67 - Browse repository at this point
Copy the full SHA 4009f67View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9946c92 - Browse repository at this point
Copy the full SHA 9946c92View commit details
Commits on Jul 9, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 0938fb7 - Browse repository at this point
Copy the full SHA 0938fb7View commit details -
Configuration menu - View commit details
-
Copy full SHA for cca5ee6 - Browse repository at this point
Copy the full SHA cca5ee6View commit details -
Configuration menu - View commit details
-
Copy full SHA for e001d51 - Browse repository at this point
Copy the full SHA e001d51View commit details -
Configuration menu - View commit details
-
Copy full SHA for c2228a2 - Browse repository at this point
Copy the full SHA c2228a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for ae7e9d5 - Browse repository at this point
Copy the full SHA ae7e9d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 060f73a - Browse repository at this point
Copy the full SHA 060f73aView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v3.3.2...v3.3.3