Project

lilac

0.0
No commit activity in last 3 years
No release in over 3 years
The Converter for various list text
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.6
~> 5.5
~> 10.0
 Project Readme

Lilac

Build Status

Lilac (luxury indented list another converter) is list converter that supports list styles of several lightweight markup languages.

Supported syntax

  • Asciidoc
  • Markdown

Installation

$ gem install lilac
$ git clone https://github.com/grauwoelfchen/lilac.git

Usage

Ruby

text = <<TEXT
* foo
** bar
*** baz
**** qux
** quux
TEXT

list = Lilac::List.new(text)
puts list.to_html #=>
<ul>
  <li>foo
    <ul>
      <li>...</li>
    </ul>
  </li>
</ul>

Command line

$ lilac
* foo
** bar
*** baz
;; press ^D
<ul>
  <li>foo
    <ul>
      <li>...</li>
    </ul>
  </li>
</ul>

Supported list styles

Asciidoc

- foo
- bar
- baz

;; p list.to_html
<ul>
  <li>foo</li>
  <li>bar</li>
  <li>baz</li>
</ul>
* foo
** bar
*** baz

;; p list.to_html
<ul>
  <li>foo
    <ul>
      <li>bar
        <ul>
          <li>baz</li>
        </ul>
      </li>
    </ul>
  </li>
</ul>

Markdown

* foo
  * bar
    * baz

;; p list.to_html
<ul>
  <li>foo
    <ul>
      <li>bar
        <ul>
          <li>baz</li>
        </ul>
      </li>
    </ul>
  </li>
</ul>

Rendered List

see HTML lists - W3C Wiki

License

MIT