Redcarpet 3.3.0
Redcarpet v3.3.0
This new release ships with a bunch of bug fixes and improvements especially regarding anchor generation.
Improvements to anchors
The anchor generation algorithm has been improved. It now correctly strips out non-alphanumeric chars from the generated string ; it tries as much as possible to match the behavior of the Active Support's #parameterize
method.
Moreover, Redcarpet used to HTML-escape anchors rendered through the HTMl_TOC
render. This is no longer the case but if you want this behavior back for any reason, you can now pass the :escape_html
option instantiating the object.
Redcarpet's command line interface
The plain old Ruby file that was provided as a bin script now relies on a brand new API that you can use and that uses Ruby's OptionParser.
This allows you to create custom scripts for your needs. You can handle the provided files as you want and add new options or fall-backs (e.g. an option to use Pygments). Read the documentation of the Redcarpet::CLI
class for further information.
Undeprecate the RedCloth API compatibility layer
This release actually un-deprecates the RedCloth API compatibility layer. Since Redcarpet provides a different API than most processors, it turned out that this layer is used in libraries that provide support for different Markdown parsers.
Bug fixes
As usual, some bugs have been fixed:
- Avoid parsing images when the given URL isn't safe and the
:safe_links_only
option is enabled. - Add the
lang-
prefix in front of the language's name when using:prettify
along with:fenced_code_blocks
.
Check out the CHANGELOG for further information.