[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: question about cosmo
- From: Graham Wakefield <wakefield@...>
- Date: Mon, 18 Jan 2010 15:38:31 -0800
I would like to fill a template in which the insertion point is
directly followed by an underscore; is there a way to convince cosmo
to do it?
e.g.
local template = "function $name_new"
local fields = { name = "foo" }
print(cosmo.fill(template, fields))
(wanted "function foo_new", got "function $name_new")
I understand that cosmo cannot distinguish the possibility of a key
'name_new' in the fields table, but I thought perhaps there was a way
to explicitly delimit the key in the template itself. E.g.:
local template = "function $[name]_new"
Or something like that. If not, then maybe this could be a feature
suggestion?
Thanks!