kivikakk / cmark-gfm-hs

Haskell bindings to libcmark-gfm GitHub Flavored Markdown parser
Other
13 stars 6 forks source link

[#26] Footnotes support #27

Closed Sorokin-Anton closed 2 years ago

Sorokin-Anton commented 2 years ago

There is extension "footnotes" in cmark-gfm, that was unsupported by this lib It extends a Node type with footnotes (like [^1) I added FOOTNOTE_DEFINITION and FOOTNOTE_REFERENCE to Node Internally it is an option, so I exposed it as an option, maybe it should be pseudo-extension instead

kivikakk commented 2 years ago

Thank you so much! I added a test to make sure this doesn't regress in the future.

The fromNode implementation is more than sufficient — if someone really wants to construct footnote nodes programmatically, then we can welcome that PR then.

I think it's fine to leave options exposed as options and extensions exposed as extensions. This is a very (very) thin wrapper, and I'm happy for it to remain that way.

Let me know if you want a new release on Hackage for this.

Sorokin-Anton commented 2 years ago

Let me know if you want a new release on Hackage for this.

@kivikakk That would be great, thanks

kivikakk commented 2 years ago

Done! 0.2.5 is now on Hackage: https://hackage.haskell.org/package/cmark-gfm-0.2.5