aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-01-19 20:41:32 -0500
committerGitHub <noreply@github.com>2024-01-20 01:41:32 +0000
commita1729cdcce7316060fc1b824591c0f4206d0209c (patch)
tree55b76592979ad9fccd39cfb08b8939e8f4740daf /ext
parent747a6fc362f227bd73adf54a3607f6cb3c8525b1 (diff)
Fix AnkiTemplateRenderer again (#535)
* Fix args issues in regex functions * Add tests
Diffstat (limited to 'ext')
-rw-r--r--ext/js/templates/sandbox/anki-template-renderer.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/js/templates/sandbox/anki-template-renderer.js b/ext/js/templates/sandbox/anki-template-renderer.js
index e4822bee..84f28c1a 100644
--- a/ext/js/templates/sandbox/anki-template-renderer.js
+++ b/ext/js/templates/sandbox/anki-template-renderer.js
@@ -248,7 +248,7 @@ export class AnkiTemplateRenderer {
const argCount = args.length;
let value = this._computeValueString(options, context);
if (argCount > 3) {
- value = `${args.slice(3, -1).join('')}${value}`;
+ value = `${args.slice(3).join('')}${value}`;
}
if (argCount > 1) {
try {
@@ -276,7 +276,7 @@ export class AnkiTemplateRenderer {
const argCount = args.length;
let value = this._computeValueString(options, context);
if (argCount > 2) {
- value = `${args.slice(2, -1).join('')}${value}`;
+ value = `${args.slice(2).join('')}${value}`;
}
if (argCount > 0) {
try {