Add details/summary and HTML block support to accepted markdown.#177
Merged
pchuri merged 1 commit intoMay 7, 2026
Merged
Conversation
Changed markdown conversion features from custom plugin to current visitor architecture: - convert <details>/<summary> HTML elements to Confluence expand macro - wrap <svg> and <div> blocks in Confluence HTML macros with CDATA - added necessary tests
Owner
|
Thank you for the thoughtful follow-up and for taking the previous review feedback to heart — this is a much cleaner approach. Highlights:
A few non-blocking nits for possible follow-up (no need to address in this PR):
Approving and merging. Thanks again for the contribution! |
pchuri
approved these changes
May 7, 2026
Owner
pchuri
left a comment
There was a problem hiding this comment.
Looks great — clean walker-based approach with solid test coverage. Thanks!
github-actions Bot
pushed a commit
that referenced
this pull request
May 7, 2026
# [2.6.0](v2.5.0...v2.6.0) (2026-05-07) ### Features * **converter:** add details/summary and HTML block support to markdown conversion ([#177](#177)) ([a4cc7a0](a4cc7a0))
|
🎉 This PR is included in version 2.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Changed markdown conversion features from custom plugin to current visitor architecture:
<details>/<summary>HTML elements to Confluence expand macro<svg>and<div>blocks in Confluence HTML macros with CDATAType of Change
Implementation Details
changed HTML passthrough in
macro-converter.js:PASSTHROUGH_BLOCK_RE: Stashes complete<svg>/<div>blocks with all nested content preserved verbatim and not processedPASSTHROUGH_TAG_RE: Extended to stash<details>/<summary>tags only, allowing markdown processing of content between tagschanges
html-to-storage.js:convertDetails()similar toconvertBlockquote()pattern - detects structure, extracts parts, emits macroconvertHtmlBlock()wraps allowlisted tags in HTML macro with CDATA escaping and UUID generation viacrypto.randomUUID()HTML_MACRO_TAGScontains tags to wrap into HTML macro to avoid unintended wrapping in HTML macro (now onlysvganddivget wrapped )Testing
Test coverage:
html-to-storage.test.jsandmacro-converter.test.jsChecklist
Example Usage
Input markdown:
Output Confluence storage: