Skip to content

Releases: vmg/redcarpet

Redcarpet v3.6.0

29 Jan 13:16
Compare
Choose a tag to compare

This release is not particularly heavy but brings a few improvements and fixes.

Improvements

  • Avoid warnings running on Ruby 3.2+ (See #721).
  • Consider <center> as a block-level element (See #702).
  • Properly provide a third argument to the table_cell callback indicating whether the current cell is part of the header or not.
    The previous implementation with two parameters is still supported (See #604 and #605).

Fixes

  • Match fence char and length when matching closing fence in fenced code blocks (Fixes #208).
  • Fix anchor generation on titles with ampersands (Fixes #696).

Redcarpet v3.5.1

15 Dec 20:06
Compare
Choose a tag to compare

Fix a security vulnerability using :quote in combination with the :escape_html option.

Reported by Johan Smits.

v3.5.0

29 Jul 12:46
Compare
Choose a tag to compare

This release mostly ships with bug fixes and tiny improvements.

Improvements

  • Avoid mutating the options hash passed to a render object (See #663).

  • Automatically enable the fenced_code_blocks option passing a HTML_TOC object to the Markdown object's constructor since some languages rely on the sharp to comment code (See #451).

  • Remove the rel and rev attributes from the output generated for footnotes as they don't pass the HTML 5 validation (See #536).

  • Allow passing Range objects to the nesting_level option to have a higher level of customization for table of contents (See #519):

    Redcarpet::Render::HTML_TOC.new(nesting_level: 2..5)

Bug fixes

  • Fix a segfault rendering quotes using StripDown and the :quote option.

  • Fix SmartyPants single quotes right after a link. For example:

    [John](http://john.doe)'s cat

    Will now properly converts ' to a right single quote (i.e. ).

v3.4.0

25 Dec 21:03
Compare
Choose a tag to compare

Redcarpet v3.4.0

This new release ships with a bunch of bug fixes especially regarding anchor generation.

Improvements to anchor generation

The anchor generation now relies on a djb2 hashing algorithm whenever the generated anchor is empty as non alpha-numeric chars. This is specifically interesting for CJK contents as Redcarpet used to generate empty anchors dealing with titles in these locales.

Special thanks to Alexey Kopytko and namusyaka for their work on that !

Also now, the html-escaped entities are removed from anchors generated with the HTML render in order to be consistent with the HTML_TOC render and as it is more expected.

Other improvements

  • Table headers don't require a minimum of three dashes anymore; a single one can be used for each row.
  • The Markdown and rendering options are now exposed through a Hash inside the @options instance variable inside your custom render objects.

Bug fixes

  • Multiple single quote pairs are parsed correctly with SmartyPants.
  • Remove periods at the end of URLs when autolinking to make sure
    that links at the end of a sentence get properly generated.
  • Avoid escaping ampersands in href links.

Checkout the CHANGELOG for further information and changes.

Redcarpet 3.3.4

25 Dec 19:38
Compare
Choose a tag to compare

This release simply fixes the bufprintf function to correctly work on Windows MinGW-w64 so strings are properly written to the buffer and also skips non-ASCII chars during anchor generation to avoid generating invalid UTF-8 bytes sequences.

Redcarpet 3.3.1

07 Jun 16:53
Compare
Choose a tag to compare

As of version 3.3.0, the provided redcarpet executable no longer worked since it relies on a new Redcarpet::CLI class that wasn't available because its file wasn't included in the gemspec. This version fixes this.

Redcarpet 3.3.0

05 Jun 17:26
Compare
Choose a tag to compare

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.

Redcarpet 3.2.3

07 Apr 18:26
Compare
Choose a tag to compare

This release of Redcarpet fixes a security issue relying on auto-linking by preventing any rewinding of a previous inline like an emphasis when auto-linking another one like an e-mail address.

Also this release ships with a fix when escaping forward slashes with the Safe render object (there was a missing semi-colon).

Redcarpet 3.2.2

12 Dec 14:54
Compare
Choose a tag to compare

This release of Redcarpet is another patch release for the 3.2 series that addresses a regression that would wrap<script> tags inside paragraphs. See #440 for further details.

Redcarpet 3.2.1

25 Nov 20:48
Compare
Choose a tag to compare

This release of Redcarpet is meant to address a backward incompatibility between version 3.1 and 3.2. Since the RedCloth API layer has been deprecated, the RedcarpetCompat class has been wrongly moved to the redcarpet/compat file but the class wasn't available when the file wasn't explicitly required.

This version fixes this requiring that file by default when Redcarpet gets loaded.