diff options
Diffstat (limited to 'ext/bg/js/anki-note-builder.js')
-rw-r--r-- | ext/bg/js/anki-note-builder.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/bg/js/anki-note-builder.js b/ext/bg/js/anki-note-builder.js index 2405543e..041e6dcd 100644 --- a/ext/bg/js/anki-note-builder.js +++ b/ext/bg/js/anki-note-builder.js @@ -81,9 +81,8 @@ class AnkiNoteBuilder { async formatField(field, data, templates, errors=null) { const pattern = /\{([\w-]+)\}/g; return await AnkiNoteBuilder.stringReplaceAsync(field, pattern, async (g0, marker) => { - data.marker = marker; try { - return await this._renderTemplate(templates, data); + return await this._renderTemplate(templates, data, marker); } catch (e) { if (errors) { errors.push(e); } return `{${marker}-render-error}`; |