From 008ffdb6bffc2855957be948a24c9e07730501d6 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 28 Nov 2020 14:30:50 -0500 Subject: Frequencies marker (#1074) * Update japanese.js tests * Simplify fallback/early exit * Add overloads to furigana and furiganaPlain handlebars helper functions * Expose unique expression/reading arrays (and subsequently counts) * Add {frequencies} marker --- test/test-japanese.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test') diff --git a/test/test-japanese.js b/test/test-japanese.js index 54186a96..e70698da 100644 --- a/test/test-japanese.js +++ b/test/test-japanese.js @@ -334,6 +334,25 @@ function testDistributeFurigana() { [ {text: '長い間', furigana: 'ながいあいだ'} ] + ], + // Same/empty reading + [ + ['飼い犬', ''], + [ + {text: '飼い犬', furigana: ''} + ] + ], + [ + ['かいいぬ', 'かいいぬ'], + [ + {text: 'かいいぬ', furigana: ''} + ] + ], + [ + ['かいぬ', 'かいぬ'], + [ + {text: 'かいぬ', furigana: ''} + ] ] ]; -- cgit v1.2.3