12 lines
429 B
Plaintext
Raw Normal View History

2017-07-11 14:54:17 +00:00
component Japanese(text string)
if arn.ContainsUnicodeLetters(text)
for _, token := range japanese.Tokenize(text)
2017-07-11 14:54:17 +00:00
if token.NeedsFurigana()
a.japanese(href="http://jisho.org/search/" + token.Original, target="_blank", rel="noopener")
ruby(title=token.Romaji)= token.Original
rt.furigana= token.Hiragana
else
ruby.japanese(title=token.Romaji)= token.Original
2017-07-11 15:15:45 +00:00
rt.furigana
2017-07-11 14:54:17 +00:00
else
span.japanese= text