Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Render callouts in code block #346

Merged
merged 4 commits into from
Jan 27, 2025
Merged

Render callouts in code block #346

merged 4 commits into from
Jan 27, 2025

Conversation

reakaleek
Copy link
Member

@reakaleek reakaleek commented Jan 27, 2025

Closes #175

Details

Based on the changes of #345 I had the opportunity to also tryout render callouts.

I'm rendering the callout with a span with the class .code-callout.

Using the mergeHTMLplugin explained at highlightjs/highlight.js#2889 the existing element is merged with the hljs element.

This way I was able to style the callout in the codeblok.

image

Source https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/346/syntax/code.html

Base automatically changed from nested-codeblock-indentation to main January 27, 2025 08:49
@reakaleek reakaleek requested review from Mpdreamz and a team and removed request for Mpdreamz January 27, 2025 08:52
@reakaleek reakaleek marked this pull request as ready for review January 27, 2025 08:52
@reakaleek reakaleek self-assigned this Jan 27, 2025
Copy link
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woohoo! 🎉

@reakaleek reakaleek merged commit 764e19a into main Jan 27, 2025
5 checks passed
@reakaleek reakaleek deleted the feature/code-callouts branch January 27, 2025 09:12
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code block callouts do not render in code
2 participants