diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-08-20 09:34:20 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-08-20 09:34:20 -0700 |
commit | b38450b6ce8b747685965153b266d9f4e49d9b7c (patch) | |
tree | 384f08c5084e4e0c9f31755b616cc61574d5a913 /tmpl | |
parent | c4525027daee6e3fdbe206ae1aab0a9c5405d753 (diff) | |
parent | c89678f5dbcb892225ce3781c350fc630d776373 (diff) |
Merge branch 'kmltml-topic/furigana' into dev
Diffstat (limited to 'tmpl')
-rw-r--r-- | tmpl/fields.html | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tmpl/fields.html b/tmpl/fields.html index 944a43e6..8bd94dc0 100644 --- a/tmpl/fields.html +++ b/tmpl/fields.html @@ -44,9 +44,19 @@ {{#*inline "furigana"}} {{~#if html~}} - {{~#if definition.reading}}<ruby>{{definition.expression}}<rt>{{definition.reading}}</rt></ruby>{{else}}{{definition.expression}}{{/if~}} + {{~#definition.furigana~}} + {{~#if furigana~}} + <ruby>{{text}}<rt>{{furigana}}</rt></ruby> + {{~else~}} + {{text}} + {{/if~}} + {{~/definition.furigana~}} {{~else~}} - {{~#if definition.reading}}{{definition.expression}} [{{definition.reading}}]{{else}}{{definition.expression}}{{/if~}} + {{#definition.furigana}} + {{~#furigana}} {{/furigana~}} + {{text}} + {{~#furigana}}[{{.}}]{{/furigana~}} + {{/definition.furigana}} {{~/if~}} {{/inline}} |