Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

Luxury Indented List Another Converter

Resources

License

Packages

No packages published

Languages