Redcarpet 3.1.0
Redcarpet version 3.1.0
It's been a long time since since we've released any version of Redcarpet but we are happy to announce the release of the version 3.1.0. Over 100 commits have been added since 3.0.0 with some new exciting features.
New features
Footnotes
This has been requested for a while but this is finally here. Redcarpet now ships with a :footnotes
option for the Markdown
object to allow you to use PHP-Markdown footnotes:
Markdown[^1] rocks!
[^1] : http://daringfireball.net/projects/markdown/
You can override the output through the #footnote_def
, #footnote_ref
and #footnotes
callbacks. Thanks to the contributors of this feature!
GitHub style anchors
Previously, passing the :with_toc_data
option to a render object would generate ids according to the order of apparition of the headers (e.g. toc_0
). The anchors are now humanized to improve the output so your table of contents are cleaner and more "SEO-friendly".
Also, by default, any markup is stripped out from the id:
# This is really **cool**
will generate:
<h1 id="this-is-really-cool">This is really <strong>cool</strong></h1>
The :quote
option
A :quote
option has been added for the Markdown
object and allows you to render quotation marks to <q>
tags. You can override this output through the #quote
callback.
Bug fixes
Apart from the new features, a few bugs have been fixed:
- Fix code blocks' classes when using Google code prettify #314
- Follow the standard to detect when new paragraph is outside last item #111
- Make ordered lists preceded by paragraph parsed with
:lax_spacing
#311 - Allow using tabs between a reference's colon and its link #337
Please see the changelog for further information.