From 800ce9ed9e33690af518e0236ec22f19f413903f Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Wed, 10 Mar 2021 20:27:01 -0500 Subject: Fix incorrect furigana distribution (#1514) * Improve distributeFuriganaInflected implementation * Update tests --- test/test-japanese.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'test/test-japanese.js') diff --git a/test/test-japanese.js b/test/test-japanese.js index e9fb9c90..8e8078d1 100644 --- a/test/test-japanese.js +++ b/test/test-japanese.js @@ -729,16 +729,26 @@ function testDistributeFuriganaInflected() { ['美味しい', 'おいしい', '美味しかた'], [ {text: '美味', furigana: 'おい'}, - {text: 'し', furigana: ''}, - {text: 'かた', furigana: ''} + {text: 'しかた', furigana: ''} ] ], [ ['食べる', 'たべる', '食べた'], [ {text: '食', furigana: 'た'}, - {text: 'べ', furigana: ''}, - {text: 'た', furigana: ''} + {text: 'べた', furigana: ''} + ] + ], + [ + ['迄に', 'までに', 'までに'], + [ + {text: 'までに', furigana: ''} + ] + ], + [ + ['行う', 'おこなう', 'おこなわなかった'], + [ + {text: 'おこなわなかった', furigana: ''} ] ] ]; -- cgit v1.2.3