util/latex: New template variable for comma separated list of arguments

You can now use '%*%' to get a comma separated list of all arguments
This commit is contained in:
Max Bruckner 2015-04-12 13:16:29 +02:00
parent 34046e22d9
commit 14347ed610

View File

@ -69,6 +69,12 @@ function expandTemplate(template, name, args) {
args.forEach(function (arg, index) {
template = template.replace(RegExp('%' + index + '%', 'g'), '{' + arg + '}');
});
//replace %*% with a comma separated list of all arguments
template = template.replace('%*%', args.map(function (arg) {
return '{' + arg + '}';
}).join(','));
return template;
}