back

BlueStole - BlueCloth Wrapper

What's BlueStole ?

BlusStole is a personal extention for Ruby's Markdown library, BlueCloth.

Points of extention are below. All fucntions other than 'HTML include' are able to set enable/disable by using each accessors.

HTML Include
Blocks starts /^<html>$/ and ends /^</html>$/ are printed directly. This function is used mainly including html document parts in Markdown documents.
Definition List dl/dt/dd (deflist)
Table (table)
You can write the RT format tables. A table block starts line that starts with '|', and ends line that doesn't start with '|'. Strings after '|' directly throw to RTtool, so if you think writing tables you must write RT format tables. Markdown elements are not converted why throwing way is direct.
Footnote (fn)
If '(*' exists, it and next ')' are converted for a footnote.
Adding id and name to hx elements (hxid)
Header lines that are converted to hx elements, are added a id and a name properties automatically. If the hx element includes a a element, properties add to the element.
Disable converting from '_' to em element (sub_us)
Original Markdown syntax converting from under score to em element, is disabled. Because it's obstruction when we write programming language's functions in Markdown documents.
EmptyElementSuffix = ' />' (sub_ees)
BlueCloth's empty element's suffix ('/>' is original) are changed to ' />'.
Adding height and width to img elements (image_info)
If a file is pointed by img element's src property exists, a height and a width properties add to the img element.

Download / Install

You can download from http://wids.net/archive/bluestole/, and cp bluestole.rb to somewhere under ruby's library path.

Requirements

How to use

require 'bluestole'

bs = BlueStole.new(strings)
bs.to_html  #=> converted strings

bs.deflist = false
bs.to_html  #=> converted strings without deflist

Licence

GNU General Public License 2

Acknowledgement

Changelog

  1. 1, Optional. It's used by Table.