-
Hi,
The problem now is
Here's a simplified version of the code visit(tree, "code", (node, index,parent )=>{
const themes = ["a","b","c","d'];
const newNodes = [];
for (const theme of themes) {
//Do whatever you will do
newNodes.push(newCodeWithTheme)
}
}) So after it's done, how do I generate the index for these nodes and tell |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 16 replies
-
Welcome @lubiah! 👋 |
Beta Was this translation helpful? Give feedback.
I linked to documentation that explains why both remark and rehype exist, and why you shouldn’t create a remark plugin when caring about HTML, but a rehype plugin, which is specifically made for dealing with HTML!