lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I just started messing with lua and couldn't resist using the lpeg
library to write a markdown parser (more or less a port of my
C library, peg-markdown).  Here's the result:

http://github.com/jgm/lunamark/tree/master

lunamark currently converts standard markdown to either HTML or
LaTeX. In my tests, it is faster than markdown.lua, though still
considerably slower than the lua binding to discount. Its main
advantages over the discount binding are portability and extensibility.
(Adding a LaTeX writer took about 20 minutes; it should also be possible
to add parsers for new input formats.)

It's my first attempt at lua, so if you spot something unidiomatic,
inefficient, or just stupid, let me know.

John