-
I add an element to an ancestor of node and - root
- ancestor
- ...more ancestors
- parent
- this is the element And I add an element to its ancestor: - root
- ancestor
- this is what I add
- ...more ancestors
- parent
- this is the element How do I return from visitor so that, next time it's traversing there's an ugly solution tho, record every valid element in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This isn’t made for that, indeed, you are not allowed to do that. What I’d recommend is to track a list of
But perhaps this is an XY question. What and why do you want to do this? |
Beta Was this translation helpful? Give feedback.
remark-gfm
is unrelated to how those footnotes are “displayed” in HTML. It’s a parser. If you want to display footnotes in, say, some very weird way, that’s possible withremark-gfm
.Where HTML comes in, is in
remark-rehype
. That’s what decides how those markdown footnotes are turned into HTML.There are already many options there, relating to footnotes. If those are not enough, from what you are trying to do, I recommend making handlers for
remark-rehype
instead.All of this can be true and be unrelated to your problem.