-
|
Any easy way to add annotation to markdown codeblock with Docusaurus? Such as the following: I would like to use these icons/markers to mark the (lines of) code I want to explain, instead of leaving long comments in the code block. Requirement: these icons should not interfere with code block one-click copying. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
We don't really have first-class support for this but the magic comment system could enable you to build it https://docusaurus.io/docs/markdown-features/code-blocks#custom-magic-comments We don't have a way currently to have "parametrized magic comments" but you can probably create magic comments for each number from 1 to 10 and that could be good enough for now? 🤔 |
Beta Was this translation helpful? Give feedback.


We don't really have first-class support for this but the magic comment system could enable you to build it
https://docusaurus.io/docs/markdown-features/code-blocks#custom-magic-comments
We don't have a way currently to have "parametrized magic comments" but you can probably create magic comments for each number from 1 to 10 and that could be good enough for now? 🤔