##// END OF EJS Templates
templater: add separate() template function...
templater: add separate() template function A pretty common pattern in templates is adding conditional separators like so: {node}{if(bookmarks, " {bookmarks}")}{if(tags, " {tags}")} With this patch, the above can be simplified to: {separate(" ", node, bookmarks, tags)} The function is similar to the already existing join(), but with a few differences: * separate() skips empty arguments * join() expects a single list argument, while separate() expects each item as a separate argument * separate() takes the separator first in order to allow a variable number of arguments after it

File last commit:

r16773:d490edc7 default
r29085:df838803 default
Show More
graphedge.tmpl
1 line | 70 B | application/x-cheetah | CheetahLexer
edge: ({col}, {row}) -> ({nextcol}, {nextrow}) (color {color})