summaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-03-07 21:51:56 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-03-07 21:51:56 -0500
commit426c1534e7d740fa2c30488a64ad4fa6a382deed (patch)
tree3c242c084c10793d1396d7caf7d8e7bce2c07f29 /ext/bg/js
parent79eb4bdc167409cda6cebf3c0939189ab4cbbaa0 (diff)
Remove marker restrictions
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/anki-note-builder.js24
1 files changed, 0 insertions, 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);