summaryrefslogtreecommitdiff
path: root/ext/bg/js/japanese.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-17 15:21:30 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-22 14:53:02 -0500
commitc0d91bffc461c61af9d35aecb7c92e15648382b2 (patch)
tree4d74f1d6b08356ab96871b5278cd511ff33b0c2a /ext/bg/js/japanese.js
parentb3212d776e3f6d735bc9d67acbebc28b7f061ba8 (diff)
Add no-shadow
Diffstat (limited to 'ext/bg/js/japanese.js')
-rw-r--r--ext/bg/js/japanese.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/bg/js/japanese.js b/ext/bg/js/japanese.js
index e8a6fa08..abb32da4 100644
--- a/ext/bg/js/japanese.js
+++ b/ext/bg/js/japanese.js
@@ -224,15 +224,15 @@ function jpDistributeFurigana(expression, reading) {
}
let isAmbiguous = false;
- const segmentize = (reading, groups) => {
+ const segmentize = (reading2, groups) => {
if (groups.length === 0 || isAmbiguous) {
return [];
}
const group = groups[0];
if (group.mode === 'kana') {
- if (jpKatakanaToHiragana(reading).startsWith(jpKatakanaToHiragana(group.text))) {
- const readingLeft = reading.substring(group.text.length);
+ if (jpKatakanaToHiragana(reading2).startsWith(jpKatakanaToHiragana(group.text))) {
+ const readingLeft = reading2.substring(group.text.length);
const segs = segmentize(readingLeft, groups.splice(1));
if (segs) {
return [{text: group.text}].concat(segs);
@@ -240,9 +240,9 @@ function jpDistributeFurigana(expression, reading) {
}
} else {
let foundSegments = null;
- for (let i = reading.length; i >= group.text.length; --i) {
- const readingUsed = reading.substring(0, i);
- const readingLeft = reading.substring(i);
+ for (let i = reading2.length; i >= group.text.length; --i) {
+ const readingUsed = reading2.substring(0, i);
+ const readingLeft = reading2.substring(i);
const segs = segmentize(readingLeft, groups.slice(1));
if (segs) {
if (foundSegments !== null) {