diff options
author | Yoitsumi <yoitsumi@gmail.com> | 2017-08-20 16:07:55 +0200 |
---|---|---|
committer | Yoitsumi <yoitsumi@gmail.com> | 2017-08-20 16:07:55 +0200 |
commit | c89678f5dbcb892225ce3781c350fc630d776373 (patch) | |
tree | 384f08c5084e4e0c9f31755b616cc61574d5a913 /tmpl/fields.html | |
parent | c4525027daee6e3fdbe206ae1aab0a9c5405d753 (diff) |
Improve {furigana} marker for anki export
Diffstat (limited to 'tmpl/fields.html')
-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}} |