From 426c1534e7d740fa2c30488a64ad4fa6a382deed Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 7 Mar 2020 21:51:56 -0500 Subject: Remove marker restrictions --- ext/bg/js/anki-note-builder.js | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/ext/bg/js/anki-note-builder.js b/ext/bg/js/anki-note-builder.js index 2a15b20d..d0ff8205 100644 --- a/ext/bg/js/anki-note-builder.js +++ b/ext/bg/js/anki-note-builder.js @@ -19,26 +19,6 @@ class AnkiNoteBuilder { constructor({renderTemplate}) { this._renderTemplate = renderTemplate; - this._markers = new Set([ - 'audio', - 'character', - 'cloze-body', - 'cloze-prefix', - 'cloze-suffix', - 'dictionary', - 'expression', - 'furigana', - 'furigana-plain', - 'glossary', - 'glossary-brief', - 'kunyomi', - 'onyomi', - 'reading', - 'screenshot', - 'sentence', - 'tags', - 'url' - ]); } async createNote(definition, mode, options, templates) { @@ -91,12 +71,8 @@ class AnkiNoteBuilder { modeKanji: mode === 'kanji', compactGlossaries: options.general.compactGlossaries }; - const markers = this._markers; const pattern = /\{([\w-]+)\}/g; return await AnkiNoteBuilder.stringReplaceAsync(field, pattern, async (g0, marker) => { - if (!markers.has(marker)) { - return g0; - } data.marker = marker; try { return await this._renderTemplate(templates, data); -- cgit v1.2.3