feat: restore panel macros from labeled blockquotes on upload - #11
Merged
Conversation
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.
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_storagenow 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 locallydocs/conversion.mdPanels section updated (no longer download-only)CHANGELOG.mdupdated underUnreleased