fix: support children macro, improve macro handling, and filter attachments#23
Merged
pchuri merged 1 commit intopchuri:mainfrom Dec 17, 2025
Merged
Conversation
05ba661 to
a46d77b
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the Confluence CLI export functionality by adding support for the children macro, improving handling of various Confluence macros (panel, include, shared-block, view-file, layout), implementing automatic language detection for UI labels, and filtering attachments to only download those referenced in page content.
Key Changes:
- Added
childrenmacro resolution that converts the macro into a markdown list of child pages with links - Implemented comprehensive macro handling for panel, include, shared-block, and view-file macros with proper markdown conversion
- Added attachment filtering to extract and download only attachments referenced in page content, reducing unnecessary downloads
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ca68a70 to
6bbaaaf
Compare
…hments - Add support for children macro: converts to markdown list of child pages - Improve macro handling: panel, include, shared-block, view-file, layout macros - Add multilingual label detection (Chinese, Japanese, Korean, Russian, French, German, Spanish, English) - Filter attachments: only download referenced attachments by default - Extract referenced attachments from page content instead of downloading all historical attachments - Fix markdownToNativeStorage to use htmlToConfluenceStorage for proper code block conversion Fixes issues where pages with children macro exported empty content, complex macros lost content, and export downloaded unnecessary attachments.
6bbaaaf to
f866bfe
Compare
Contributor
Author
|
@pchuri Resolve done. |
Owner
|
lgtm |
github-actions Bot
pushed a commit
that referenced
this pull request
Dec 17, 2025
## [1.11.1](v1.11.0...v1.11.1) (2025-12-17) ### Bug Fixes * support children macro, improve macro handling, and filter attachments ([#23](#23)) ([15b721a](15b721a))
|
🎉 This PR is included in version 1.11.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
bestend
pushed a commit
to bestend/confluence-cli
that referenced
this pull request
Feb 9, 2026
…hments (pchuri#23) - Add support for children macro: converts to markdown list of child pages - Improve macro handling: panel, include, shared-block, view-file, layout macros - Add multilingual label detection (Chinese, Japanese, Korean, Russian, French, German, Spanish, English) - Filter attachments: only download referenced attachments by default - Extract referenced attachments from page content instead of downloading all historical attachments - Fix markdownToNativeStorage to use htmlToConfluenceStorage for proper code block conversion Fixes issues where pages with children macro exported empty content, complex macros lost content, and export downloaded unnecessary attachments.
bestend
pushed a commit
to bestend/confluence-cli
that referenced
this pull request
Feb 9, 2026
## [1.11.1](pchuri/confluence-cli@v1.11.0...v1.11.1) (2025-12-17) ### Bug Fixes * support children macro, improve macro handling, and filter attachments ([pchuri#23](pchuri#23)) ([d7b4bba](pchuri@d7b4bba))
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
This PR fixes several issues with Confluence CLI export functionality:
childrenmacro now export child pages as a markdown listpanel,include,shared-block,include-shared-block,view-file, and layout macrosChanges
1. Children Macro Support (
lib/confluence-client.js)resolveChildrenMacro()method to convertchildrenmacro to markdown list of child pages2. Macro Handling Improvements (
lib/confluence-client.js)detectLanguageLabels()method for automatic language detectionstorageToMarkdown()to handle:panelmacro → markdown blockquote with titleincludemacro → markdown link to included pageshared-blockandinclude-shared-blockmacros → markdown blockquote with contentview-filemacro → file linkac:layout,ac:layout-section,ac:layout-cell) → removed, content preserved3. Attachment Filtering (
lib/confluence-client.js,bin/confluence.js)extractReferencedAttachments()method to extract attachment filenames from page contentreadPage()to support extracting referenced attachmentsexportcommand to only download referenced attachments by default--pattern) still works for filtering all attachments if neededTesting
Tested with pages containing:
Breaking Changes
None. All changes are backward compatible.
Related Issues
Fixes issues where:
childrenmacro exported empty content