lua-users home
lua-l archive

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


On Fri, Nov 26, 2010 at 03:35, steve donovan <steve.j.donovan@gmail.com> wrote:
> On Fri, Nov 26, 2010 at 8:08 AM, kevin beckford <chiggsy@lazyweb.ca> wrote:
>> awesome!

Thanks. :)


>> Q:  Is there support for round tripping, ie: can i parse html into
>> haml code using this?
>
> In an ideal world, all HTML would be well-formed XML and everything
> would be groovy. However, 90% of HTML is crap (Sturgeon's Law).
>
> Maybe you need something like Jeff Pohlmeyer's  luahtml? [1]
>
> [1] http://jkp.t35.com/lua/

I haven't used this but if it does a good job it should be fairly easy
to output Haml from HTML, since all the hard work is in the HTML
parser.

The original Haml in Ruby comes with a utility called html2haml that
does a good job; if you have some templates you want to convert right
now, then that might be an option for you.

Regards,

Norman