Skip to content

feat: add GFM alert/admonition support - #29

Merged
geopanther merged 1 commit into
mainfrom
feature/gfm-alerts
May 8, 2026
Merged

feat: add GFM alert/admonition support#29
geopanther merged 1 commit into
mainfrom
feature/gfm-alerts

Conversation

@geopanther

Copy link
Copy Markdown
Owner

Add support for GitHub-Flavored Markdown alerts ([!NOTE], [!TIP], [!WARNING], [!CAUTION], [!IMPORTANT]) converting them to Confluence structured macros (info, tip, warning, note).

Changes

  • New alerts plugin handling alerts, spoilers, and plain blockquotes
  • Registered after spoiler plugin to avoid conflicts
  • Maps GFM alert types to Confluence macro types
  • 145 tests passing

Add custom Mistune plugin that detects GitHub alert syntax in blockquotes
and renders them as Confluence info/tip/warning/note structured macros.

- Create mdfluence/plugins/ package with alerts plugin
- Plugin handles alerts, spoilers, and plain blockquotes in single parser
- Add block_alert() renderer method to ConfluenceRenderer
- Register plugin after spoiler to avoid block_quote override conflict
- Add parametrized tests for all 5 alert types
@geopanther
geopanther merged commit 2e28c3f into main May 8, 2026
5 checks passed
@geopanther
geopanther deleted the feature/gfm-alerts branch May 13, 2026 09:27
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