Open wooorm opened 4 years ago
Having an issue as of late ...
please upgrade to remark 13 to use this plugin
Any idea how to easily fix this?
Apologies, been busy with work as of late. At first glance, this update will require a rewrite; I'll take a crack at it this weekend.
Some context:
This plugin essentially modifies remark-footnotes's logic to write an index as the footnote node's label instead of using the identifier (the string identifying the footnote, [^example-footnote-identifier]
. I took a quick look at the new parser micromark and remark-footnotes's change for this update (remarkjs/remark-footnotes@0cfeae1dcd0d0bef743e64805df2fe741d00bb08). It seems all the footnote logic has moved to mdast-util-footnote. Copying the from-markdown.js
and to-markdown.js
files there and changing the footnote label
logic is essentially what I'll be "fixing."
If the new logic allows, this could even be upstreamed as an option for remark-footnotes
.
@jhull I think that message is emitted by remark-footnotes, not this plugin. If it is emitted, it means you are using a newer remark-footnotes, with an older remark.
@jackfletch I don’t think you need to worry about that. This plugin does not integrate with the parser. remark-numbered-footnote-labels
runs after remark-footnotes
on the syntax tree to change the identifiers.
Thanks @wooorm, though I've read your comment a couple times and still can't figure out the next step - if this is the only plugin I found that actually created proper footnotes, I should...?
This is what I have for remark now:
"remark-container": "^0.1.2",
"remark-numbered-footnote-labels": "^1.1.0",
"@silvenon/remark-smartypants": "^1.0.0",
You need remark-footnotes in there somewhere.
This plugin needs remark-footnotes to be used beforw it. It doesn't create footnotes, it changes their labels
Also see the open issues of the other plugins. They might need internals to change
This was actually an issue with another plugin, NuxtJS's Content module. They haven't updated remark-parse
to the latest.
Downgrading to remark-footnotes 2.0
solved this temporarily for me.
Hi!
remark is switching to a new parser internally (micromark, see
remarkjs/remark#536
for more info). From a quick glance at the code, it seems this plugin should be fine (although footnotes are in remark-footnotes). However, it would be good to check that in the future (there is13.0.0-alpha.0
published now, and one or two more will come before the release)