2017-07-11 14:54:17 +00:00
|
|
|
component Japanese(text string)
|
|
|
|
if arn.ContainsUnicodeLetters(text)
|
2017-07-12 20:45:33 +00:00
|
|
|
for _, token := range arn.JapaneseTokenizer.Tokenize(text)
|
|
|
|
if token.Furigana
|
2017-07-11 14:54:17 +00:00
|
|
|
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
|