diff options
author | praschke <stel@comfy.monster> | 2023-10-16 23:02:41 +0100 |
---|---|---|
committer | praschke <stel@comfy.monster> | 2023-10-17 22:44:14 +0100 |
commit | a454cc3ca1c34e51de13fe21f375f1f47d96a1e9 (patch) | |
tree | eefb8097aa768dedfda6d59bcf46d9861bd4e391 /ext | |
parent | 4527cc03fe88cd747d0eb62a65d9d54247653483 (diff) |
remove kanjiLinks and sanitizeCssClass
Diffstat (limited to 'ext')
-rw-r--r-- | ext/js/templates/sandbox/anki-template-renderer.js | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/ext/js/templates/sandbox/anki-template-renderer.js b/ext/js/templates/sandbox/anki-template-renderer.js index 5d8ebd38..766c7798 100644 --- a/ext/js/templates/sandbox/anki-template-renderer.js +++ b/ext/js/templates/sandbox/anki-template-renderer.js @@ -68,9 +68,7 @@ class AnkiTemplateRenderer { ['dumpObject', this._dumpObject.bind(this)], ['furigana', this._furigana.bind(this)], ['furiganaPlain', this._furiganaPlain.bind(this)], - ['kanjiLinks', this._kanjiLinks.bind(this)], ['multiLine', this._multiLine.bind(this)], - ['sanitizeCssClass', this._sanitizeCssClass.bind(this)], ['regexReplace', this._regexReplace.bind(this)], ['regexMatch', this._regexMatch.bind(this)], ['mergeTags', this._mergeTags.bind(this)], @@ -189,20 +187,6 @@ class AnkiTemplateRenderer { } } - _kanjiLinks(context, options) { - const jp = this._japaneseUtil; - let result = ''; - for (const c of options.fn(context)) { - if (jp.isCodePointKanji(c.codePointAt(0))) { - result += `<a href="#" class="kanji-link">${c}</a>`; - } else { - result += c; - } - } - - return result; - } - _stringToMultiLineHtml(string) { return string.split('\n').join('<br>'); } @@ -211,10 +195,6 @@ class AnkiTemplateRenderer { return this._stringToMultiLineHtml(options.fn(context)); } - _sanitizeCssClass(context, options) { - return options.fn(context).replace(/[^_a-z0-9\u00a0-\uffff]/ig, '_'); - } - _regexReplace(context, ...args) { // Usage: // {{#regexReplace regex string [flags] [content]...}}content{{/regexReplace}} |