diff options
| author | praschke <stel@comfy.monster> | 2023-10-17 21:54:53 +0100 | 
|---|---|---|
| committer | praschke <stel@comfy.monster> | 2023-10-17 21:54:53 +0100 | 
| commit | 68ff30006edcd0dca44326780d34a6ca39f65157 (patch) | |
| tree | 53f1006aab41a1f7b8a85d1a797376dba8ebdc5c /ext/js | |
| parent | 376a1b096874e601296321fa6307836e2736a05c (diff) | |
fix: regexReplace and regexMatch
joining the args together without cutting out the options arg can add
an '[object Object]' into the result.
Diffstat (limited to 'ext/js')
| -rw-r--r-- | ext/js/templates/sandbox/anki-template-renderer.js | 4 | 
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 62bf71b8..5d8ebd38 100644 --- a/ext/js/templates/sandbox/anki-template-renderer.js +++ b/ext/js/templates/sandbox/anki-template-renderer.js @@ -226,7 +226,7 @@ class AnkiTemplateRenderer {          const options = args[argCount];          let value = typeof options.fn === 'function' ? options.fn(context) : '';          if (argCount > 3) { -            value = `${args.slice(3).join('')}${value}`; +            value = `${args.slice(3, -1).join('')}${value}`;          }          if (argCount > 1) {              try { @@ -250,7 +250,7 @@ class AnkiTemplateRenderer {          const options = args[argCount];          let value = typeof options.fn === 'function' ? options.fn(context) : '';          if (argCount > 2) { -            value = `${args.slice(2).join('')}${value}`; +            value = `${args.slice(2, -1).join('')}${value}`;          }          if (argCount > 0) {              try { |