A plugin to wrap 2 siblings #753
Replies: 1 comment 4 replies
-
this repository is
You can most of the known rehype plugins here: https://github.com/rehypejs/rehype/blob/main/doc/plugins.md#readme
Reading the nuxt content documentation is a good starting point: https://content.nuxtjs.org/configuration#markdownrehypeplugins |
Beta Was this translation helpful? Give feedback.
-
Currently, https://github.com/florentb/rehype-wrap-all is able to wrap individual elements, i.e. each selected element will have one wrapper of its own.
But, what I want is to be able to wrap 2 sibling elements into one parent wrapper.
I am using Nuxt + its Content module for markdown.
Example:
florentb/rehype-wrap-all#3 (comment)
What is expected?
This should be converted
to this
Is there any already existing plugin to do so? If not, how to proceed with the following code of rehype plugin to be registered in
nuxtconfig.js
?Beta Was this translation helpful? Give feedback.
All reactions