feat: migrate to mistune 3.x API - #18
Merged
Merged
Conversation
BREAKING CHANGE: requires mistune >=3.0,<4 (drops mistune 0.x support) - Replace mistune.Renderer with mistune.HTMLRenderer (escape=False) - Rename header() to heading(), update link/image/block_code signatures - Replace mistune.escape_link with mistune.escape_url - Use mistune.Markdown directly with typed result narrowing - Regenerate functional test result.xml for v3 output - Update README code example
Required for plugin API used in upcoming rendering features.
Enable table, strikethrough, mark, insert, superscript, subscript, footnotes, def_list, abbr, math, spoiler, task_lists, and url plugins. Mistune 3.x ships with all plugins disabled by default. Add Confluence-specific overrides: XHTML-compliant task list attributes, anchor macros for footnotes, and mathinline/mathblock/enablelatexmath macros for LaTeX math rendering.
Parametrized unit tests for all 13 enabled mistune plugins. Functional test markdown demonstrating all plugin features.
Add table listing all 13 enabled Mistune plugins with syntax examples. Note that math rendering requires the LaTeX Math - MathJax Confluence plugin and that enablelatexmath is auto-injected when math is detected. Update library usage example to show plugin activation.
Confluence strips <abbr> and <mark> HTML5 tags, content degrades to plain text. Spoiler div has no native visual effect. Add warnings to plugin table in README.
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
Migrates from legacy mistune 0.x API to mistune 3.x, fixing Dependabot PR #16 incompatibility.
Changes
mistune>=0.8.4,<1→mistune>=3.0,<4mistune.Renderer→mistune.HTMLRenderer(escape=False)header()→heading(), reorderedlink(text, url, title)/image(text, url, title),lang→infomistune.escape_link→mistune.escape_urlmistune.Markdown(renderer=...)with typed result narrowingresult.xmlBREAKING CHANGE
Requires mistune >=3.0 (drops 0.x support). No user-facing API changes.
Tests
Supersedes Dependabot PR #16.