diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2019-11-11 21:58:04 +0200 |
---|---|---|
committer | siikamiika <siikamiika@users.noreply.github.com> | 2019-11-23 17:50:46 +0200 |
commit | 84f30113e4b8b750525b5e67a2a6bfa68da666ff (patch) | |
tree | 9b0498ae24405b6122211f4f2fa2da4fecd1d6c9 /ext/mixed | |
parent | b02a30a2fddb3b660a62f66541e90dba519cb270 (diff) |
give names to complex slices
Diffstat (limited to 'ext/mixed')
-rw-r--r-- | ext/mixed/js/japanese.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/mixed/js/japanese.js b/ext/mixed/js/japanese.js index 1201e524..e2d7a090 100644 --- a/ext/mixed/js/japanese.js +++ b/ext/mixed/js/japanese.js @@ -107,10 +107,11 @@ function jpDistributeFuriganaInflected(expression, reading, source) { } const offset = source.length - stemLength; - for (const segment of jpDistributeFurigana( - source.slice(0, offset === 0 ? source.length : source.length - offset), - reading.slice(0, offset === 0 ? reading.length : reading.length - expression.length + stemLength) - )) { + const stemExpression = source.slice(0, source.length - offset); + const stemReading = reading.slice( + 0, offset === 0 ? reading.length : reading.length - expression.length + stemLength + ); + for (const segment of jpDistributeFurigana(stemExpression, stemReading)) { output.push(segment); } |