summaryrefslogtreecommitdiff
path: root/ext/js/templates/sandbox
diff options
context:
space:
mode:
authorCashew <52880648+Scrub1492@users.noreply.github.com>2023-12-20 21:36:27 +0900
committerGitHub <noreply@github.com>2023-12-20 12:36:27 +0000
commit229f04ba358b3485fa7952088e03dad9e651bb23 (patch)
treedfb4a0431368e2067d7e6f5d9ce08bf88e1730cd /ext/js/templates/sandbox
parent8b943cc97fab890085448122e7c13dd035d0e238 (diff)
rename variables (#409)
* rename variables * add comment to ambiguous variable * rename variables * add comments * rename functions
Diffstat (limited to 'ext/js/templates/sandbox')
-rw-r--r--ext/js/templates/sandbox/anki-template-renderer.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/js/templates/sandbox/anki-template-renderer.js b/ext/js/templates/sandbox/anki-template-renderer.js
index 857922bf..515e85da 100644
--- a/ext/js/templates/sandbox/anki-template-renderer.js
+++ b/ext/js/templates/sandbox/anki-template-renderer.js
@@ -171,10 +171,10 @@ export class AnkiTemplateRenderer {
/** @type {import('template-renderer').HelperFunction<string>} */
_furigana(args, context, options) {
const {expression, reading} = this._getFuriganaExpressionAndReading(args, context, options);
- const segs = this._japaneseUtil.distributeFurigana(expression, reading);
+ const segments = this._japaneseUtil.distributeFurigana(expression, reading);
let result = '';
- for (const {text, reading: reading2} of segs) {
+ for (const {text, reading: reading2} of segments) {
const safeText = this._escape(text);
const safeReading = this._escape(reading2);
if (safeReading.length > 0) {
@@ -190,10 +190,10 @@ export class AnkiTemplateRenderer {
/** @type {import('template-renderer').HelperFunction<string>} */
_furiganaPlain(args, context, options) {
const {expression, reading} = this._getFuriganaExpressionAndReading(args, context, options);
- const segs = this._japaneseUtil.distributeFurigana(expression, reading);
+ const segments = this._japaneseUtil.distributeFurigana(expression, reading);
let result = '';
- for (const {text, reading: reading2} of segs) {
+ for (const {text, reading: reading2} of segments) {
if (reading2.length > 0) {
if (result.length > 0) { result += ' '; }
result += `${text}[${reading2}]`;