-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Add code blocks transformation to Confluence code macro #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add code blocks transformation to Confluence code macro #66
Conversation
Implements proper rendering of markdown code blocks in Confluence by converting them to structured code macros with syntax highlighting. This addresses issue Telefonica#65 where code blocks were appearing as inline text instead of formatted code blocks. The feature is enabled by default and can be disabled for compatibility with older Confluence versions via the confluence.rehype.codeBlocks configuration option.
44f9f5d to
9502952
Compare
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
Wow! Fantastic work, thank you so much for this contribution! 🙌 I really appreciate the thorough implementation and comprehensive test coverage. There are just two small details I'd like to suggest. I've left some detailed comments in the code review regarding the configuration structure and default values. I'm happy to handle merging this into the release branch and exposing the new configuration option through the general configuration system. I won't ask you to do this part since the code for adding these options can be a bit tricky—and I don't think that's the best use of your time on a first contribution! 😊 |
components/markdown-confluence-sync/src/lib/confluence/transformer/ConfluencePageTransformer.ts
Outdated
Show resolved
Hide resolved
…alse - Move codeBlocks from confluence.rehype.codeBlocks to top-level configuration - Change default value from true to false for backward compatibility - Update documentation to reflect new configuration structure This addresses PR feedback to align configuration structure with architectural boundaries and ensure backward compatibility with older Confluence versions that don't support code macros through the API. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
Changing the base branch to |
7819627
into
Telefonica:feat/65/rehype-codeblocks
Summary
Implements proper rendering of markdown code blocks in Confluence by converting them to structured code macros with syntax highlighting support. This addresses issue #65 where code blocks were appearing as inline text instead of formatted code blocks.
Changes
rehype-replace-code-blocksplugin to transform<pre><code>elements to Confluence's code macro formatconfluence.rehype.codeBlocksconfiguration option (default:true) to enable/disable the feature for compatibility with older Confluence versionsImplementation Details
The plugin:
<ac:structured-macro ac:name="code">formatTest Plan
Closes #65