kramdown

fast, pure-Ruby Markdown-superset converter

News

Atom-Feed
Published on Thursday, 09 May 2013

kramdown 1.0.2 released

This release fixes some bugs; updating is recommended.

Some notes:

  • The tests page has been updated to include relative times in the benchmark so that it is possible to better gauge the performance of kramdown (requested by postmodern).

  • The kramdown Wiki now contains a listing of libraries that extend kramdown (idea by postmodern).

Changes

  • 4 bug fixes

    • Fixed GH#51: Try requiring a parser/converter library based on the specified input/output name (requested by postmodern)
    • Fixed GH#49: Convert non-breaking space to ~ for LaTeX converter (patch by Henning Perl)
    • Fixed GH#42: No more warning for IALs/ALDs/extensions without attributes (reported by DHB)
    • Fixed GH#44: Removed trailing whitespace in link definition for kramdown converter (patch by Marcus Stollsteimer)
Published on Monday, 11 March 2013

kramdown 1.0.1 released

This release just fixes a bug where kramdown was modifying the input string, so updating is recommended.

Changes

  • 1 bug fix

    • Fixed GH#40: Input string was unintentionally modified
Published on Sunday, 10 March 2013

kramdown 1.0.0 released

Finally! After four years of development I proudly present you kramdown 1.0.0!

Naturally, it is recommened to update to this version.

Although the version number now starts with one, the changes from the last release are mostly bug fixes and some small changes. The biggest change is the license change: Until now kramdown was released under the GPL but starting from 1.0.0 it is released under the MIT license!

The MIT license allows the use of kramdown in a commercial setting. However, if you are using kramdown in a commercial setting, I ask you to contribute back any changes you make for the benefit of the community and/or to make a donation - thanks in advance!

Changes

  • 4 minor changes

    • New option transliterated_header_ids for transliterating header text into ASCII before generating a header ID which is useful for language like Vietnamese (fixed GH#35, requested by Kỳ Anh)
    • The quotation mark entity " now gets converted to its character equivalent when entity_output=as_char.
    • A warning is now output for IALs/ALDs that contain not attribute defintion.
    • HTML footnote output is changed to use class instead of rel to achieve (X)HTML4/5 compatibility
  • 3 bug fixes

    • Fixed GH#38: Encoding problem on 1.9/2.0 due to incompatible encodings – the source string is now converted to UTF-8 before parsing and converted back after converting (reported by Simon Lydell)
    • Fixed RF#29647: Abbreviations with non-word first character at start of text lead to exception (reported by Stephan Dale)
    • Fixed RF#29704: ID specified on atx style headers were not always correctly detected (reported by Kyle Barbour)
Published on Sunday, 20 January 2013

kramdown 0.14.2 released

This release adds the possibility to pre-define link definitions via the new option link_defs. Apart from that one bug was fixed.

It is recommened to update to this version.

On a side note the kramdown homepage has been updated to show a menu of the available documentation pages when viewing a documentation page. And a documentation page showing all available options has been added.

Changes

  • 1 minor change

    • New option link_defs for pre-defining link definitions
  • 1 bug fix

    • Fixed raised errors on atx headers without text
Published on Friday, 30 November 2012

kramdown 0.14.1 released

This is just a bug fix release and it is recommened to update to this version.

Changes

  • 3 bug fixes

    • Only HTML elements that must not contain a body (like <br />) are output in this form, all other elements now use an explicit closing tag (resolves among other things issues with <i>)
    • Specifying a block IAL before a definition list now works correctly
    • Fixed bug GH#30: Empty body for a definition in a definition list lead to an exception (reported by Mark Johnson)
Published on Sunday, 16 September 2012

kramdown 0.14.0 released

First of all please note that this release contains a backwards-incompatible change: The syntax for specifying a code language for a code block or code span has changed. Instead of using lang='CODELANG' one has to use .language-CODELANG now.

This change has been introduced to avoid problems because the lang="..." attribute is used by HTML for other purposes than setting the code language. Furthermore using .language-CODELANG is also proposed by HTML5 and it seems to be a good way to achieve the needed functionality.

Other changes in this release include the possibility of setting the code language on the starting line of a fenced code block and a way of excluding certain headers from the table of contents by assigning the .no_toc class to them.

Changes

  • 2 major changes

    • Code language is now specified via .language-CODELANG instead of lang='CODELANG'
    • Implemented support for setting language on fenced code block starting line (initial patch by Bran)
  • 1 minor change

    • Headers with an ID can be prevented from showing in the TOC by assigning the .no_toc class to them (patch by Tim Bates)
  • 1 bug fix

    • Numeric instead of symbolic HTML entities are now the default fallback (patch by Gioele Barabucci)
Published on Friday, 31 August 2012

kramdown 0.13.8 released

This release brings two new options (one for adjusting header levels and the other for enabling/disabling coderay). And the usual bug fixes.

Changes

  • 2 minor changes

    • New option header_offset for offsetting all header levels (initial patch by Michal Till)
    • New option enable_coderay for enabling/disabling coderay (initial patch by Bran)
  • 5 bug fixes

    • Reserved HTML characters in abbreviation titles are now correctly output (patch by Alex Tomlins)
    • Similar abbreviations (like CSS and CSS3) are now correctly parsed
    • Fixed bug RF#29626: Text of mailto-link was sometimes wrongly obfuscated (reported by B Wright)
    • Fixed known Ruby 1.9.3 problem with RakeTest task (patch by Gioele Barabucci)
    • Fixed double output of ‘markdown’ attribute on HTML elements in kramdown converter
  • 1 documentation change

    • README file is now called README.md and uses kramdown syntax (patch by Bran)
Published on Sunday, 03 June 2012

kramdown 0.13.7 released

This release, aside from fixing bugs and some other minor changes, adds a new converter for removing HTML tags from an element tree. This means that one can now do

kramdown -i html -o remove_html_tags,kramdown my_document.html

and get a nice kramdown document from a full HTML document!

Changes

  • 1 major change

  • 3 minor changes

    • Updated kramdown binary to support multiple, chained output formats
    • Added a new option for setting a default coderay highlighting language (requested by Lou Quillio)
    • Feature request RF#29575: Added support for &shy; soft-hyphen entity (requested by Alexander Groß)
  • 5 bug fixes

    • Fixed bug RF#29576: Footnotes in headers resulted in duplicated id attr in TOC (reported by korthaerd)
    • Multi-line titles in links are now correctly parsed
    • DOCTYPE declaration is now correctly parsed independent of case
    • Setting of nil options works now by using the String ‘nil’
    • Fixed table-of-content test cases (test went green although the meaning of the test was not satisfied due to copy-paste - d’oh!)
  • 1 documentation fix

    • Fixed bug RF#29577: sidebar link to news page was broken for HTML pages in sub directories (reported by korthaerd)
Published on Wednesday, 09 May 2012

kramdown 0.13.6 released

This is just a bug fix release and it is recommened to update to this version.

Changes

  • 2 bug fixes

    • Fixed a problem with CDATA sections appearing in MathJax output (reported by Xi Wang, see github commit)
    • Fixed bug RF#29557: Parsing fails with lists that contain an empty list item (reported by Juan Romero Abelleira)
Published on Sunday, 19 February 2012

kramdown 0.13.5 released

This is mostly a bug fix release and it is recommened to update to this version.

The kramdown homepage has also be updated visually. This should provide a better reading experience for mobile and small-screen devices.

Changes

  • 2 minor changes:

    • HTML attributes without values are now supported (fixes bug RF#29490 reported by Nat Welch)
    • HTML attributes names are now always converted to lower case for consistency
  • 5 bug fixes

    • Fixed Document#method_missing to accept snake_cased class name (patch by tomykaira)
    • Fixed problem with missing REXML constant on older Ruby 1.8.6 version (reported by Dave Everitt)
    • Fixed bug RF#29520: Valid inline math statement does not trigger math block anymore (reported by Gioele Barabucci)
    • Fixed bug RF#29521: HTML math output is now always XHTML compatible (reported by Gioele Barabucci)
    • Empty id attributes are now handled better by the HTML and kramdown converters (reported by Jörg Sommer)
  • 1 documentation fix:

    • Fixed invalid options statement in example on quick reference page (reported by Jörg Sommer)
Published on Friday, 16 December 2011

kramdown 0.13.4 released

This is mostly a bug fix release and it is recommened to update to this version.

Changes

  • 1 minor change:

    • Added a converter that extracts the TOC of a document (requested by Brendan Hay). Note that this is only useful if you use kramdown as a library!
  • 7 bug fixes

    • Fixed a typo: It should be --output and not --ouput (patch by postmodern)
    • Fixed HTML converter to correctly output empty span tags (patch by John Croisant)
    • Fixed bug RF#29350: Parsing of HTML tags with mismatched case now works
    • Fixed bug RF#29426: Content of style tags is treated as raw text now
    • HTML converter now uses rel instead of rev to be HTML5 compatible (patch by Joe Fiorini)
    • Fixed Ruby 1.9.3 related warnings
    • Fixed HTML parser to work around an implementation change of Array#delete_if in Ruby 1.9.3
Published on Friday, 06 May 2011

kramdown 0.13.3 released

This is just a bug fix release and it is recommened to update to this version.

Changes

  • 1 minor change:

    • Added support for correctly parsing more HTML5 elements (requested by Bernt Carstenschulz)
  • 10 bug fixes:

    • Table line |a|`b` was parsed as |a`b` (patch by Masahiro Kitajima)
    • Table line |`a` lead to error condition (patch by Masahiro Kitajima)
    • Added OrderedHash#dup to fix a problem when converting a document more than once (reported by Michael Papile)
    • Fixed places where the document tree was modified during conversion
    • Fixed bug in LaTeX image element converter that was introduced in a former release (reported by Michael Franzl)
    • Fixed problem with block HTML tag being treated as header text
    • Fixed problem with footnotes in LaTeX tables – now using longtable instead of tabular environment (reported by Michael Franzl)
    • The style attribute is now used for outputting table cell alignments in HTML instead of using the deprecated col tags
    • Fixed HTML-to-native conversion of unsupported HTML elements
    • Fixed kramdown converter to correctly output table cells with attributes
  • 1 documentation fix:

    • Some HTML tags were not properly escaped on the quick reference page (reported by Yasin Zähringer)
Published on Monday, 21 February 2011

kramdown 0.13.2 released

This release just fixes a problem when parsing long paragraphs/blockquotes under Ruby 1.8.

Changes

  • 1 bug fix:

    • Fixed bug RF#28917: Regexp buffer overflow when parsing long paragraphs or blockquotes under Ruby 1.8 (reported by Michael Fischer)
Published on Saturday, 22 January 2011

kramdown 0.13.1 released

The focus of this release was bringing kramdown one step closer to the 1.0 release. The API hasn’t changed so this is a drop-in replacement for the previous version of kramdown.

If you think that

  • kramdown is still missing an important syntax found in another Markdown implementation,
  • the API doesn’t feel right,
  • or anything else is missing or should be changed for the 1.0 release,

please tell us so by writing to kramdown-users@rubyforge.org!

Changes

  • 3 minor changs:

    • The LaTeX converter now inserts \hypertarget commands for all elements that have an ID set. The normal link syntax can be used to link to such targets (requested by David Doolin)
    • New option smart_quotes for specifying how smart quotes should be output (requested by Michael Franzl)
    • Any character except a closing bracket is now valid as link identifier (this makes this part of the kramdown syntax compatible to Markdown syntax)
  • 10 bug fixes:

    • Fixed error when parsing unknown named entities (reported by David Doolin)
    • Added entity definitions for entities &ensp;, &emsp; and &thinsp; (patch by Damien Pollet)
    • Block HTML line was incorrectly recognized as table line (reported by Piotr Szotkowski)
    • Fixed bug RF#28809: Empty <a> tags are were output as self-closed tags (reported by Tim Cuthbertson)
    • Fixed bug RF#28785: Name of default template in documentation for template option was false (reported by Matthew Bennink)
    • Fixed bug RF#28769: span extension in list item wrongly triggered list item IAL parser (reported by Yann Esposito)
    • The table row parser has been fixed so that it does not use pipes which appear in <code> tags as cell separators anymore (like it is done with the native code span syntax)
    • Fixed bug where converting <em> and <strong> tags to native elements was wrongly done
    • Fixed calculation of cell alignment values when converting HTML tables to native ones, <col/> tags are now correctly used
    • HTML Tables are now only converted to native tables if all table rows have the same number of columns.
  • 1 deprecation note:

    • Removed deprecated option toc_depth – use the option toc_levels instead.
Published on Monday, 01 November 2010

kramdown 0.12.0 released

Some changes in the last release of kramdown lead to a performance drop. Therefore some performance optimizations have been done resulting in about 15% less created objects (which reduces the garbage collection pressure) and quite a performance gain (this version of kramdown is the faster than any previous version when using Ruby 1.9.2) – see the tests page for detailed information.

Aside from the performance optimizations, a Markdown-only parser based on the kramdown parser has been added

The “internal” API (which is currently everything except the Kramdown::Document class) has changed again and developers may therefore need to update their extensions! The API changes now allow parsers and converters to be used without a Kramdown::Document class since this class is just provided for convenience. All the needed information is now stored in the element tree itself. Information that has no direct representation as an element is stored in the options of the root element (e.g. abbreviation definitions). More information can be found in the API documentation.

The API should now be relatively stable and once kramdown reaches 1.0.0, the final API will only be changed in backwards compatible ways.

Changes

  • 1 major change:

    • Added Markdown-only parser
  • 6 minor changes:

    • Angle brackets can now also be escaped
    • Pipe characters in code spans that appear in tables do not need to be escaped anymore
    • New option toc_levels for specifying the header levels used for the table of contents (requested by Rick Frankel, RF#28672)
    • MathJax instead of jsMath is now used for math output in the HTML converter
    • New option latex_headers for customizing the header commands for the LaTeX converter
    • Removed parsing of HTML doctype in HTML parser
  • 6 bug fixes:

    • Fixed output of paragraphs starting with a right angle bracket in the kramdown converter
    • Invalid span IALs are now left alone and not removed anymore
    • Option entity_output is now respected when outputting a non-breaking space for emtpy table cells in the HTML converter (reported by Matt Neuburg)
    • Fixed bug where a block IAL before a block HTML element was ignored (reported by Matt Neuburg)
    • Fixed bug where block IALs were falsely applied to nested elements (reported by Matt Neuburg)
    • Fixed bug RF#28660: Converting <div><br /></div> from HTML to kramdown resulted in stack trace (reported by Garrett Heaver)
  • 1 deprecation note:

    • The option toc_depth is replaced by the new option toc_levels and will be removed in the next version.
Published on Friday, 01 October 2010

kramdown 0.11.0 released

The biggest change in this release is the implementation of the “lazy syntax” which allows one to not use the correct indent or block marker and still continue a paragraph, blockquote, … The original Markdown syntax allows this and it was requested that kramdown allows this, too. However, the main reason for adding this syntax to kramdown is not to encourage authors to be lazy but to allow kramdown texts to be hard-wrapped by other applications (think, for example, email programs). Therefore you shouldn’t make active use of this feature when creating a kramdown document!

Another important, though minor, change is that invalid HTML tags and extensions are not removed anymore. This is done because of the general rule that unrecognized elements are treated as simple text.

Note: The “internal” API (which is currently everything except the Kramdown::Document class) has changed and developers may therefore need to update their extensions!

Changes

  • 3 major changes:

    • Line wrapping a.k.a. “lazy syntax” is now supported (requested by Shawn Van Ittersum)
    • Link URLs in inline links and link definitions may now also contain spaces, even if not enclosed in angle brackets (requested by Matt Neuburg)
    • The kramdown converter produces nicer output, using the new option line_width
  • 9 minor changes:

    • The HTML converter does not escape the quotation mark in code blocks anymore (requested by Matt Neuburg)
    • The order of HTML attributes and attributes defined via IALs and ALDs is now preserved (requested by Matt Neuburg)
    • Syntax highlighting is now supported in code spans when using the HTML converter (requested by Josh Cheek)
    • Updated nomarkdown extension and converters to support restricting the output to certain or all converters
    • Colons are now allowed in ID names for ALDs and IALs
    • Tables and math blocks now have to start and end on block boundaries
    • The table syntax was relaxed to allow table lines that don’t start with a pipe character (to be more compatible with PHP Markdown Extra tables)
    • HTML elements <b> and <i> are now converted to <strong> and <em> when using HTML-to-native conversion
    • The document.html template now uses the text of the first not-nested header as title text
  • 9 bug fixes:

    • The LaTeX converter now removes trailing whitespace in footnotes (reported by Michael Franzl)
    • Fixed bug RF#28429: HTML output of iframe HTML element was invalid (reported by Matthew Riley)
    • Fixed bug RF#28420: LaTeX converter shouldn’t escape the content of the nomarkdown extension (reported by Bj Wilson)
    • Fixed bug RF#28469: HTML “document” template did not work (reported by Vofa Ethe)
    • Fixed bug: HTML/kramdown output of textarea HTML element was invalid (reported by John Muhl)
    • Invalid or unknown extension tags are now left alone and not removed anymore
    • Invalid HTML tags are now left alone and not removed anymore
    • Fixed a minor problem in list parsing which arised due to compact nested list detection
    • Link/Abbreviation/Footnote definitions as well as extensions, ALDs and block IALs now work correctly as block separators
  • 1 deprecation note:

    • The option numeric_entities has been removed
Published on Monday, 19 July 2010

kramdown 0.10.0 released

This release contains many small changes and improvements as well as many bug fixes, thanks to all the people on the kramdown mailing list!

Changes

  • Minor changes:

    • The LaTeX converter now also outputs the element attributes on the end tag (requested by Michael Franzl)
    • New option entity_output for specifying how entities should be output
    • The underscore in the option names is now replaced with a hyphen for nicer CLI option names
    • Paragraphs that contain only an image are converted to figures in the LaTeX converter (requested by Michael Franzl)
    • Added information to the LaTeX converter documentation on how to change the header types and quotation marks
  • Bug fixes:

    • LaTeX converter now outputs line breaks correctly (reported by Michael Franzl)
    • Always outputting the entities zcaron and Zcaron numerically since browser support seems to be non-existing (reported by Eric Sunshine)
    • Fixed warnings and problems when running under Ruby 1.9.2-rc1
    • Fixed problem with smart quote directly after smart quote output in LaTeX converter (reported by Michael Franzl)
    • Fixed problem in the HTML parser that prevented <body markdown="1"> from being processed correctly (reported by Eric Sunshine)
    • Blockquotes with multiple child elements are now output with the quotation environment instead of the quote environment by the LaTeX converter (reported by Michael Franzl)
    • Fixed problem with parsing autolinks when using an encoding different from UTF-8 (reported by Eric Sunshine)
    • Fixed problem with parsing HTML <a> tag without href attribute (reported by Eric Sunshine)
  • Deprecation notes:

    • The option numeric_entities is replaced by the new option entity_output and will be removed in the next version
    • The method Kramdown::Converter::Html#options_for_element has been removed
Published on Wednesday, 23 June 2010

kramdown 0.9.0 released

The biggest change in this release is the addition of a kramdown converter. This converter together with the HTML parser enables one to convert an HTML document into a kramdown document.

Apart from that there are many other small changes and bug fixes, a full list of which you find below.

Changes

  • Major changes:

    • New kramdown converter that converts an element tree into a kramdown document
  • Minor changes:

    • Added option numeric_entities that defines whether entities are output using their names or their numeric values
    • Added option toc_depth for specifying how many header levels to include in the table of contents (patch by Alex Marandon)
    • Ruby 1.9 only: The HTML converter now always tries to convert entities to their character equivalences if possible
    • Change in HTML parser: conversion of pre and code elements to their native counterpart is only done if they contain no entities (under Ruby 1.9 entities are converted to characters before this check if possible)
    • The comment extension now produces comment elements that are used by the converters
    • IALs can now also be assigned to definitions (i.e. dd elements)
    • Image links may now be specified without alternative text (requested by Rune Myrland, fixes RF#28292)
    • The HTML parser gained the ability to convert conforming span and div elements to math elements
    • The LaTeX converter now outputs the element attributes as LaTeX comment for some elements (blockquotes, lists and math environments; requested by Michael Franzl)
  • Bug fixes:

    • Fixed problem with list item IALs: the IAL was not recognized when first element was a code block
    • Fixed ri documentation error on gem installation (patch by Alex Marandon)
    • Math content is now correctly escaped when using the HTML converter
    • Fixed html-to-native conversion of tables to only convert conforming tables
  • Deprecation notes:

    • The filter_html option has been removed.
    • The method Kramdown::Converter::Html#options_for_element has been renamed to html_attributes – using the old name is deprecated and the alias will be removed in the next release
Published on Tuesday, 08 June 2010

kramdown 0.8.0 released

One of the bigger changes in this release is the support for converting HTML tags into native kramdown elements via the new html_to_native option. For example, the HTML tag p is converted to the native paragraph element instead of a generic HTML tag if this option is set to true. This is especially useful for converters that don’t handle generic HTML tags (e.g. the LaTeX converter).

This conversion is a feature of the new standalone HTML parser which is used by the kramdown parser for parsing HTML tags.

Also note that support for the old extension syntax and custom extensions has been dropped as of this release! And the filter_html option will be removed in the next release because there exist better facilities for performing this kind of task!

Changes

  • Major changes:

    • New parser for parsing HTML documents
    • Added the option html_to_native (default: false) which tells the kramdown parser whether to convert HTML tags to native kramdown elements or to generic HTML elements.
  • Minor changes:

    • Table header cells are now represented by their own element type
    • The element type :html_text is not used anymore - it is replaced by the general :text element
    • HTML comments are now converted to LaTeX comments when using the LaTeX converter
    • The LaTeX converter can now output the contents of HTML <i> and <b> tags
  • Bug fixes:

    • Attributes that have been assigned to the to-be-replaced TOC list are now added correctly on the generated TOC list in the HTML converter
    • Fixed problem in typographic symbol processing where an entity string instead of an entity element was added
    • Fixed problem with HTML span parsing: some text was not added to the correct element when the end tag was not found
    • HTML code and pre tags are now parsed as raw HTML tags
    • HTML tags inside raw HTML span tags are now parsed correctly as raw HTML tags
    • The Rakefile can now be used even if the rdoc gem is missing (patch by Ben Armston)
    • Fixed generation of footnotes in the LaTeX converter (patch by Ben Armston)
    • Fixed LaTeX converter to support code spans/blocks in footnotes
    • HTML comments and XML processing instructions are now correctly parsed inside raw HTML tags
    • HTML script tags are now correctly parsed
    • Fixed the abbreviation conversion in the LaTeX converter
    • Empty image links are not output anymore by the LaTeX converter
  • Deprecation notes:

    • The old extension syntax and support for custom extensions has been removed.
    • The filter_html option will be removed in the next release.
Published on Friday, 07 May 2010

kramdown 0.7.0 released

This release adds syntax support for abbreviations. This means that kramdown is now syntax-wise on par with Maruku and PHP Markdown Extra!

Another big change is the extension support: After some discussion on the mailing list (many thanks to Eric Sunshine and Shawn Van Ittersum), the syntax for the extensions has been changed and support for custom extensions will be dropped in a future release.

Additionally, the option auto_ids has been moved from being interpreted by the parser to being interpreted by the converters. This means that it is not possible anymore to turn automatic header ID generation on or off for parts of a text.

The HTML and LaTeX converters also gained the ability to generate a table of contents. Just add the reference name “toc” to an ordered or unordered list and it will be replaced by the ToC (this is “coincidentally” the same syntax that Maruku uses…).

Changes

  • Major changes:

    • Added support for PHP Markdown Extra like abbreviations
    • Added support for span extensions
    • New syntax for block/span extensions
    • Added support for generating a table of contents in the HTML and LaTeX converters
  • Minor changes:

    • The option auto_ids has been moved from the parser to the converters.
    • Invalid span IALs are now removed from the output
    • IALs can now be applied to individual list items by placing the IAL directly after the list item marker
    • Added an option for prefixing automatically generated IDs with a string
    • Block IALs can now also be put before a block element
  • Bug fixes:

    • Fixed a problem with parsing smart quotes at the beginning of a line (reported by Michael Franzl)
  • Deprecation notes:

    • Removed deprecated CLI option -f
    • The old extension syntax and support for custom extensions will be removed in the next release.
Published on Tuesday, 06 April 2010

kramdown 0.6.0 released

This release adds syntax support for block and inline LaTeX math (for example: ). Aside from that there are the usual small enhancements and bug fixes.

Changes

  • Major changes:

    • Added syntax support for block and inline LaTeX math
  • Minor changes:

    • Added a man page for the kramdown binary
    • Added a CLI option for selecting the input format and changed the output format option to -o
    • Small syntax change for list items: the last list item text is now also wrapped in a paragraph tag if all other list items are.
    • Added documentation on available parsers and converters
  • Bug fixes:

    • Fixed problem where clearly invalid email autolinks were permitted (reported by Eric Sunshine)
    • Added documentation for autolinks (reported by Eric Sunshine)
    • Fixed performance problem related to emphasis parsing (reported by Chris Heald)
    • Fixed bug RF#27957: document templates were missing from distribution packages (reported by Alex Bargi)
    • Fixed problem with LaTeX converter handling HTML elements not correctly
  • Deprecation notes:

    • The CLI options -f will be removed in the next release.
Published on Monday, 15 February 2010

kramdown 0.5.0 released

This release features syntax support for smart quotes in kramdown documents and a new converter for LaTeX output. The kramdown binary has also been enhanced to support setting any option.

The additional support for the smart quotes makes this release of kramdown a little bit slower than the previous releases when run under Ruby 1.8. However, a small optimization in the span parser which is not noticable under Ruby 1.8 gives quite a performance boost under Ruby 1.9 (see the graphs on the tests page).

Also note that the internals have been restructured slightly. So if you do more than just using the basic

Kramdown::Document.new(SOURCE, OPTIONS).to_html

you may need to adapt your code.

Since the option handling has been revamped, each coderay option must not be set separably!

Changes

  • Major changes:

    • Enhanced the kramdown binary (it now supports setting the available options)
    • Added support for ERB templates to wrap the generated output
    • Added syntax support for smart quotes
    • Added a converter for LaTeX output
  • Minor changes:

    • Some code restructurations
    • The quotation mark " is not converted to &quot; in normal text anymore.
  • Bug fixes:

    • Fixed problem with multibyte encodings under Ruby 1.9
Published on Friday, 22 January 2010

kramdown 0.4.0 released

This release features the addition of a simple table syntax and syntax highlighting of code blocks. I think that with these two additions kramdown now supports all the major features regarding parsing and HTML output that Maruku supports.

Regarding speed: Simple benchmarks using the Markdown README file (can be found inside this zip file) show that kramdown is currently faster than, for example, the original Markdown.pl, PHP Markdown, PHP Markdown Extra, Python Markdown and Maruku.

Changes

  • Major changes:

  • Minor changes:

    • Changed CSS class name kramdown-footnotes to footnotes for better compatibility
  • Bug fixes:

    • Regular expression for matching escaped characters now works correctly
Published on Sunday, 20 December 2009

kramdown 0.3.0 released

The HTML block syntax was changed in this release sothat using raw HTML blocks works more naturally and the rules are easier to remember. This also lead to the creation of a completely new HTML block parser. Apart from that, there have also been some bug fixes.

Another important change is that kramdown now also runs under Ruby 1.8.5.

Changes

  • Major changes:

    • Added a compatibility fix so that kramdown works under Ruby 1.8.5 (requested by Steve Huff)
    • Complete overhaul of the used block HTML syntax and block HTML parser
    • Using the same semantics for invalid end tags and unclosed tags in the block and span HTML parser
  • Bug fixes:

    • Fixed warnings on Ruby 1.9
    • Fixed bug in emphasis parser where emphasis started with an underscore at the beginning of a new line inside a paragraph was not recognized (reported by Eric Sunshine)
  • Deprecation notes:

    • The old extension names kdoptions and nokramdown have been removed, only the new names options and nomarkdown will work from now on.
Published on Thursday, 03 December 2009

kramdown 0.2.0 released

The most important changes in this release are the inclusion of a definition list syntax and the much improved HTML parser. For example, the HTML parser now recognizes the markdown attribute for enabling and disabling syntax processing in an HTML element and it works in many more scenarios.

The kramdown syntax is still a bit in in a state of flux but all of the major syntax elements (except a syntax for tables) are now available. The following releases will focus on stability and fixing bugs.

kramdown now also passes 16 from the 23 original Markdown test cases and if one looks at the ones that fail one can easily see that this is because of the small changes in the syntax (e.g. converting --- to &mdash). This means that almost all Markdown documents show be correctly parsed by kramdown!

Last but not least I want to thank Eric Sunshine for his many helpful comments, suggestions and bug reports!

Changes

  • Major changes:

    • Definition lists are now supported
    • Option auto_ids now defaults to true
    • kramdown syntax (except HTML block lines) is not processed anymore by default in HTML block tags
    • Added option for enabling/disabling parsing of HTML blocks/spans
    • Added recognition and usage of the “markdown” attribute for HTML block/span tags
    • Renamed extensions kdoptions to options and nokramdown to nomarkdown (suggested by Eric Sunshine)
    • Added support for setting header IDs via the syntax available in PHP Markdown Extra and Maruku
  • Bug fixes:

    • Fixed bug that occured when using auto_ids=true and an IAL for assigning an ID to a header
    • Fixed bug with parsing of autolinks (reported by Eric Sunshine)
    • Fixed many bugs regarding HTML parsing – HTML parsing should work much better now (reported by Eric Sunshine)
    • Fixed bug with parsing of horizontal rules which contain tabs
  • Deprecation notes:

    • The old extension names kdoptions and nokramdown will be removed in one of the next versions, use the new names options and nomarkdown.
Published on Saturday, 21 November 2009

kramdown 0.1.0 released

This is the first release of kramdown, yet-another-Markdown converter for Ruby, with the following features:

  • Written in pure Ruby, no need to compile an extension (like BlueCloth or rdiscount)

  • Fast (current impl ~5x faster than Maruku, ~10x faster than BlueFeather, although ~30x slower than native code like rdiscount)

  • Strict syntax definition (special cases for which the original Markdown page does not account for are explicitly listed and it is shown how kramdown parses them - see the Syntax page)

  • Supports common Markdown extension (similar to Maruku)