Pregunta

I must be missing something very obvious -- I can't get footnotes to work with redcarpet. I have version 3.0.0:

> gem list redcarpet
*** LOCAL GEMS ***

redcarpet (3.0.0)

I am trying code from the test code on the Github repo that has footnotes and it won't convert the Markdown to HTML that contains the footnote. I reduced the code down to just the footnotes function and put it on Gist.

The output is simply as follows:

<p>This is a footnote.[^1]</p>
<p>[^1]: It provides additional information.</p>

What am I missing here?

¿Fue útil?

Solución

I have had this problem as well. It looks like the Rubygem needs to be updated past version 3.0.0 in order for footnotes to work. There are changes in the master branch which aren't available on Rubygems.

To fix your issue for the time being, source the gem from the Redcarpet Github repo:

gem 'redcarpet', github: 'vmg/redcarpet', branch: 'master'

Then run bundle install. Footnotes should now work.

I've opened an issue on the Redcarpet repo to try to get someone to update the Rubygem with the latest changes. I'll post back here if/when that's done.

Otros consejos

Actually, the :footnotes extension is only on master ; we haven't yet released a version which ships with this feature. This will be in 3.1.0 (since we are using semantic versioning) that we are about to release (we have still some adjustments to do). You can safely depend on the master branch of the repository ; we are always ensuring that our test suite is green on Travis!

Thank you, have a nice day!

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top