Skip to content
Luxury Indented List Another Converter
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib
test
.gitignore
.travis.yml
ChangeLog
Gemfile
LICENSE.txt
README.md
Rakefile
lilac.gemspec

README.md

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

You can’t perform that action at this time.