From 14347ed610653924a8e36ffc3e8c4b323739cca7 Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Sun, 12 Apr 2015 13:16:29 +0200 Subject: [PATCH] util/latex: New template variable for comma separated list of arguments You can now use '%*%' to get a comma separated list of all arguments --- lib/util/latex.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/util/latex.js b/lib/util/latex.js index e1e0916c7..5372d98c6 100644 --- a/lib/util/latex.js +++ b/lib/util/latex.js @@ -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; }