Skip to content

Commit

Permalink
Fix args issues in regex functions
Browse files Browse the repository at this point in the history
  • Loading branch information
toasted-nutbread committed Jan 16, 2024
1 parent 48f1d01 commit d3d5087
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/js/templates/sandbox/anki-template-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit d3d5087

Please sign in to comment.