Bot releases are visible (Hide)
This release is not particularly heavy but brings a few improvements and fixes.
<center>
as a block-level element (See #702).table_cell
callback indicating whether the current cell is part of the header or not.Published by robin850 almost 4 years ago
Fix a security vulnerability using :quote
in combination with the :escape_html
option.
Reported by Johan Smits.
This release mostly ships with bug fixes and tiny 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)
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. ’
).
This new release ships with a bunch of bug fixes especially regarding 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.
Hash
inside the @options
instance variable inside your custom render objects.Checkout the CHANGELOG for further information and changes.
Published by robin850 almost 9 years ago
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.
Published by robin850 over 9 years ago
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.
Published by robin850 over 9 years ago
This new release ships with a bunch of bug fixes and improvements especially regarding anchor generation.
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.
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.
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.
As usual, some bugs have been fixed:
:safe_links_only
option is enabled.lang-
prefix in front of the language's name when using :prettify
along with :fenced_code_blocks
.Check out the CHANGELOG for further information.
Published by robin850 over 9 years ago
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).
Published by robin850 almost 10 years ago
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 vmg/redcarpet#440 for further details.
Published by robin850 almost 10 years ago
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.
Published by robin850 about 10 years ago
StripDown
renderThe StripDown
render object will now handle images and correctly display links' URL. For instance:
Here's a ![squirrel](shipit.png) !
And an external [link](https://github.com).
Will now render to:
Here's a squirrel shipit.png !
And an external link (https://github.com) !
Safe
renderIn order to safely deal with users' input for instance, Redcarpet now ships with a Redcarpet::Render::Safe
object.
The :safe_links_only
and :escape_html
options are turned on by default. It also has a custom block_code
callback since by default the specified language will be set as the class of the rendered code block.
Redcarpet::Markdown.new(Redcarpet::Render::Safe)
HTML5 blocks-level elements are now recognized so that they will not be included under a paragraph.
The Redcarpet's compatibility layer for the old RedCloth API has been deprecated. If you are still relying on it, please do update your code to rely on the new API.
This layer will be removed any time Redcarpet reaches 4.0.
Some bug fixes have also been applied:
:safe_links_only
option is enabled (#372):highlight
option) (#369)Check out the CHANGELOG for further information.
Published by robin850 over 10 years ago
This release remove the yielding of the anchor
parameter when overriding the header
callback. This change has been introduced in 3.1.0 but this was a breaking change for people upgrading from 3.0.0. We are sorry for the inconvenience !
Published by mattr- over 10 years ago
This release of Redcarpet is meant to address a serious bug when rendering text that contains headings and contains all the prior enhancements of Redcarpet 3.1.0. For more information about Redcarpet 3.1.0, please see the release notes
Fix a crash when rendering text that contained an anchor.
Published by robin850 over 10 years ago
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.
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!
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>
:quote
optionA :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.
Apart from the new features, a few bugs have been fixed:
:lax_spacing
#311
Please see the changelog for further information.
Published by mattr- over 11 years ago
Robin, Vicent ,and I are happy to announce the release of Redcarpet 3.0.0! We've got the usual line up of goodies to talk about, so let's get to the good stuff.
We've removed support for Ruby 1.8.x in this release. If you still need Ruby 1.8.x support, then you'll need to stick with Redcarpet 2.3.0.
We've also removed the sundown submodule that was included in the Redcarpet codebase. Sundown has been deprecated for some time and all the code has been included in the redcarpet repository for awhile as well. So long Sundown and thanks for all the fish.
We've got a new option you can pass to the Redcarpet::Markdown
object: :highlight
. This feature will let you use wrap a bit of text in a pair of equals signs and Redcarpet will generate markup that will cause it to be highlighted. If you want to use this option, you can use the following Ruby code:
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, :highlight => true)
to render the following markdown
This is ==highlighted== text, yo.
as
This is <mark>highlighted</mark> text, yo.
Thanks to Sam Soffes for contributing this. If you want to see it in action before you give it a try, check out Sam's blog.
We've fixed several issues in the Redcarpet codebase in this release. Here are some of the highlights:
Thanks to Robin Dupret for fixing all of these!
We're really excited about Redcarpet 3.0.0 and hope you enjoy using it as much as we enjoyed making it. If you have any issues, please feel free to file an issue and we'll take a look at it.
Thanks!