aboutsummaryrefslogtreecommitdiff
path: root/tmpl
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-08-20 09:34:20 -0700
committerAlex Yatskov <alex@foosoft.net>2017-08-20 09:34:20 -0700
commitb38450b6ce8b747685965153b266d9f4e49d9b7c (patch)
tree384f08c5084e4e0c9f31755b616cc61574d5a913 /tmpl
parentc4525027daee6e3fdbe206ae1aab0a9c5405d753 (diff)
parentc89678f5dbcb892225ce3781c350fc630d776373 (diff)
Merge branch 'kmltml-topic/furigana' into dev
Diffstat (limited to 'tmpl')
-rw-r--r--tmpl/fields.html14
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}}