sbseltzer / ja-srs-utils

Formatting better Japanese SRS cards
MIT License
0 stars 0 forks source link

Furigana for non-kanji #8

Open sbseltzer opened 7 years ago

sbseltzer commented 7 years ago

Furigana may also be useful for not non-kanji characters, such as katakana (and perhaps other things?) as well. Much like Japanese toddlers, I learned hiragana before katakana, so it's a legit use-case in my eyes.

In any case, a quick solution would be "if furigana braces are encountered and the character before is a non-kanji, seek backwards to the next space" or something. It may be worth considering the merits of making this the general case, since it's a necessary workaround when you only want to specify furigana for a few particular kanji. The spaces could be trimmed after the fact.