aboutsummaryrefslogtreecommitdiff
path: root/ext/js/data/options-util.js
diff options
context:
space:
mode:
authorKuuuube <61125188+Kuuuube@users.noreply.github.com>2024-05-12 22:16:02 -0400
committerGitHub <noreply@github.com>2024-05-13 02:16:02 +0000
commit81390468b95e786e2aabb41ddcbdd91ab9b345c3 (patch)
tree763894899f3a60f1c346cb34377d3c9f3b9b99de /ext/js/data/options-util.js
parent0b02bf46c9fac64287b1fce338927e34b87f4144 (diff)
Add glossary-first handlebars (#921)24.5.13.0
* Add glossary-first handlebars * Add docs * Fix missing /if * Write handlebars test data
Diffstat (limited to 'ext/js/data/options-util.js')
-rw-r--r--ext/js/data/options-util.js11
1 files changed, 10 insertions, 1 deletions
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