Skip to content

How do I specify Index for node's ancestor in visitParents? #126

Answered by wooorm
sheey11 asked this question in Q&A
Discussion options

You must be logged in to vote

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 with remark-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.


The footnote is copied to the reference's lowest <p> ancestor's parent, to find that ancestor and its parent, I think there's no better tool than unist-util-visit-parent.

All of this can be true and be unrelated to your problem.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@sheey11
Comment options

@wooorm
Comment options

Answer selected by sheey11
@sheey11
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants