{}

BlueCloth 2

Version 2.0.0 of BlueCloth has been released.

BlueCloth is a Ruby implementation of Markdown, a text-to-HTML conversion tool for web writers. To quote from the project page:

Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).

BlueCloth 2 is a complete rewrite using David Parsons’ Discount library, a C implementation of Markdown. I rewrote it using the extension for speed and accuracy; the original BlueCloth was a straight port from the Perl version that I wrote in a few days for my own use just to avoid having to shell out to Markdown.pl, and it was quite buggy and slow. I apologize to all the good people that sent me patches for it that were never released.

This version offers several improvements over BlueCloth 1.x:

Markdown → HTML, 100 iterations (experiments/benchmark.txt, 8064 bytes) Rehearsal -———————————————————————————— OldBlueCloth (1.1.0) 10.510 0.940 11.450 ( 11.465679) BlueCloth (2.0.0) 0.050 0.000 0.050 ( 0.049065) RDiscount (1.3.4) 0.050 0.010 0.060 ( 0.051278) Maruku (3.1.7.2) 6.010 0.030 6.040 ( 6.050488) PEGMarkdown (1.4.4) 0.510 0.010 0.520 ( 0.514029) BlueFeather (0.11) 13.290 0.830 14.120 ( 14.135277) Tartan::Markdown::Parser (0.2.1) 14.100 0.190 14.290 ( 14.309854) -——————————————————————— total: 46.530000sec user system total real OldBlueCloth (1.1.0) 9.650 0.830 10.480 ( 10.498269) BlueCloth (2.0.0) 0.050 0.000 0.050 ( 0.048067) RDiscount (1.3.4) 0.050 0.000 0.050 ( 0.055891) Maruku (3.1.7.2) 5.850 0.020 5.870 ( 5.870594) PEGMarkdown (1.4.4) 0.510 0.000 0.510 ( 0.510181) BlueFeather (0.11) 12.820 0.910 13.730 ( 13.778271) Tartan::Markdown::Parser (0.2.1) 14.250 0.210 14.460 ( 14.471178)

Project Page

You can submit bug reports, feature requests, and suggestions via the project page.

Installation

Via gems:

$ sudo gem install bluecloth

or from source:

$ wget http://deveiate.org/code/bluecloth-2.0.0.tar.gz $ tar -xzvf bluecloth-2.0.0.tar.gz $ cd bluecloth-2.0.0 $ sudo rake install
{}