summaryrefslogtreecommitdiff
path: root/ext/js/data
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/data')
-rw-r--r--ext/js/data/anki-template-util.js3
-rw-r--r--ext/js/data/options-util.js11
2 files changed, 13 insertions, 1 deletions
diff --git a/ext/js/data/anki-template-util.js b/ext/js/data/anki-template-util.js
index b9c5ba84..20170dae 100644
--- a/ext/js/data/anki-template-util.js
+++ b/ext/js/data/anki-template-util.js
@@ -46,6 +46,9 @@ export function getStandardFieldMarkers(type) {
'glossary',
'glossary-brief',
'glossary-no-dictionary',
+ 'glossary-first',
+ 'glossary-first-brief',
+ 'glossary-first-no-dictionary',
'part-of-speech',
'pitch-accents',
'pitch-accent-graphs',
diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js
index ba404bc2..521b4c9b 100644
--- a/ext/js/data/options-util.js
+++ b/ext/js/data/options-util.js
@@ -541,7 +541,8 @@ export class OptionsUtil {
this._updateVersion31,
this._updateVersion32,
this._updateVersion33,
- this._updateVersion34
+ this._updateVersion34,
+ this._updateVersion35
];
/* eslint-enable @typescript-eslint/unbound-method */
if (typeof targetVersion === 'number' && targetVersion < result.length) {
@@ -1277,6 +1278,14 @@ export class OptionsUtil {
await this._applyAnkiFieldTemplatesPatch(options, '/data/templates/anki-field-templates-upgrade-v34.handlebars');
}
+ /**
+ * - Added dynamic handlebars for first dictionary entry only.
+ * @type {import('options-util').UpdateFunction}
+ */
+ async _updateVersion35(options) {
+ await this._applyAnkiFieldTemplatesPatch(options, '/data/templates/anki-field-templates-upgrade-v35.handlebars');
+ }
+
/**
* @param {string} url