would be nice in jade/scaml that attribute values could be function calls without requiring {} wrapper
Jade/Scaml supports nice expressions like
which is equivalent to
though since its so common to want to use the uri function to normalise links, it'd be nice to be able to do
instead of the more verbose
i.e. the parser for an attribute value would just have to look for: identifier <~ "(" and if so eat all the text up to ")" and decide its an expression
a(href=myLink)
some text
which is equivalent to
a(href={myLink})
some text
though since its so common to want to use the uri function to normalise links, it'd be nice to be able to do
a(href=uri("/foo"))
some text
instead of the more verbose
a(href={uri("/foo")})
some text
i.e. the parser for an attribute value would just have to look for: identifier <~ "(" and if so eat all the text up to ")" and decide its an expression
Leave a comment
Supporting identifiers separated by dots and [] or () would be useful too: http://groups.google.com/group/scalate/browse_thread/thread/db6a47e89bdf5f13