BlueDoc::SML

CircleCI

SML (Slate markup language) is a rich text format for describe of the BlueDoc rich contents.

It base on JsonML format, and including custom DSL.

Usage

gem "bluedoc-sml"

and then run bundle install

$ sml = %(["p", { align: "center", indent: 1 }, "Hello world"])
$ renderer = BlueDoc::SML.parse(sml)
$ renderer.to_html
=> <p style="text-align: center; text-indent: 32px;">Hello world</p>
$ renderer.to_text
=> "Hello world"

License

The gem is available as open source under the terms of the MIT License.