summaryrefslogtreecommitdiff
path: root/ext/bg/js/japanese.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-22 15:22:42 -0500
committerGitHub <noreply@github.com>2020-02-22 15:22:42 -0500
commit897f2360be13db70ff2f533089ba8d38b0b744ed (patch)
treefdfdc9ed13fb38117e922d27c60616f159a2c63e /ext/bg/js/japanese.js
parentf8f03f3af0ab031cc58bf5ad3f782c8d45137430 (diff)
parent6513a15b3b5fd8586226c8823e2680478b97e132 (diff)
Merge pull request #363 from toasted-nutbread/eslint-stylistic-rules
Eslint stylistic rules
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) {