npm / marky-markdown

npm's markdown parser
https://www.npmjs.com/package/@npmcorp/marky-markdown
405 stars 71 forks source link

Support footnotes? #403

Closed thecristen closed 7 years ago

thecristen commented 7 years ago

I didn't see an issue for this already, but I think it'd be great if this parser supported the usage of footnotes.

As a point of reference, markdown-it has a plugin that does this.

revin commented 7 years ago

Hi @thecristen thanks for the question! To my knowledge GitHub Flavored Markdown doesn't support footnotes, is that correct? I created a test gist to check, and it doesn't seem to know what to do with them. The only mention of footnotes in the GFM spec is in the introduction, where it talks about certain extensions of markdown supporting them.

Since marky's goal is to be a JS implementation of GFM, supporting footnotes would be a non-goal for the project. However! If you're using marky programmatically, we have a getParser() method (see the docs that can give you access to the internal markdown-it instance. You could use that and add the plugin that way.

Does that help? If not, or if I've gotten something wrong (happens every single day! 😛 ), please let me know.