jamessimone / gatsby-remark-footnotes

Customize your Gatsby Remark markup footnotes
MIT License
4 stars 0 forks source link

Allow user to customize the footnote divider #6

Closed matthewwiese closed 3 years ago

matthewwiese commented 3 years ago

This PR adds an option to customize the "divider" between the footnotes and Markdown body text.

At present, an <hr/> element is added to separate the two. However, in the course of my project I wanted some control over this, so made this minor change. I figured it might be useful to others. :smile:

Merry Christmas, and thanks for this plugin James!

jamessimone commented 3 years ago

Thanks for the PR, and for the added functionality — and a Merry Christmas to you as well. Everything looks good to me; I normally would use the “double bang” for coercing to truthy, but I saw your added note in the Readme about using the empty string as a way to remove the


entirely. Seems like a fair trade-off to me. I’m on mobile at the moment, but I will formally approve this, merge to master, and publish a new NPM version tomorrow.

Edit - hilarious that the “hr” element above was transformed as is. Hopefully it’s clear what I meant, haha.

matthewwiese commented 3 years ago

Yeah, the empty string use-case is actually my motivation. I previously had a simple boolean removeHorizontalRule option, but I think this PR may be more generally useful to others. People in my case can remove it entirely if they have a complex solution, while others can merely substitute additional HTML.

Also, I got a good chuckle out of the literal <hr/>. If you hadn't made an edit I would have just thought you were being purposefully cheeky. :laughing:

jamessimone commented 3 years ago

@matthewwiese published as 0.0.8 - thanks for contributing!