lua-users home
lua-l archive

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

# What is Cosmo

Cosmo is a "safe templates" engine. It allows you to fill nested
templates, providing many of the advantages of Turing-complete
template engines, without without the downside of allowing arbitrary
code in the templates.

# Changes

* Rewritten to use LPEG to parse and process the templates, instead of
string.gsub, makes Cosmo much easier to extend
* Nested selectors ($foo|1|bar)
* Selector arguments ($foo{ x = 5, y = 3 })
* Cosmo lets selector functions know if they have a subtemplate
* Rock in the main repository

# Get it

luarocks install cosmo

Visit for more information

# Thanks

Many thanks to Yuri Takhteyev and André Carregal for the idea and the
previous implementations.

Fabio Mascarenhas