Skip to content

feat: restore panel macros from labeled blockquotes on upload - #11

Merged
blaipr merged 1 commit into
mainfrom
feat/panels-upload
Aug 12, 2026
Merged

feat: restore panel macros from labeled blockquotes on upload#11
blaipr merged 1 commit into
mainfrom
feat/panels-upload

Conversation

@blaipr

@blaipr blaipr commented Aug 12, 2026

Copy link
Copy Markdown
Member

Problem

Panels were one-way: download degraded them to labeled blockquotes, but uploading the same file turned them into plain blockquotes, losing the panel styling on every round trip.

Change

md_to_confluence_storage now recognises blockquotes whose first paragraph starts with **Info:**, **Note:**, **Warning:** or **Tip:** (exactly the shape download produces) and restores the matching panel macro, with the remaining blockquote content as the panel body. Labels are matched case-insensitively; any other label (custom panel titles) stays a regular blockquote. Placeholder substitution now runs in reverse insertion order so code blocks and images nested inside a panel body resolve correctly.

Compatibility

Round trips now preserve standard panels. Anyone deliberately writing > **Note:** ... as a plain blockquote will get a note panel on upload — documented in docs/conversion.md.

Checklist

  • ruff check src tests, ruff format --check src tests, python -m pytest tests/ pass locally
  • Tests added (label matching, case-insensitivity, unknown labels, full round trip)
  • docs/conversion.md Panels section updated (no longer download-only)
  • CHANGELOG.md updated under Unreleased

@blaipr
blaipr merged commit f4ec5fb into main Aug 12, 2026
1 check passed
@blaipr
blaipr deleted the feat/panels-upload branch August 12, 2026 00:05
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