diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-11-28 14:30:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-28 14:30:50 -0500 |
commit | 008ffdb6bffc2855957be948a24c9e07730501d6 (patch) | |
tree | be6642b030011f0007aad1025da3c5accd0d9a54 /docs/templates.md | |
parent | 94d63f4f87a61f7e42ea44d8100ea11d5ccdbce0 (diff) |
Frequencies marker (#1074)
* Update japanese.js tests
* Simplify fallback/early exit
* Add overloads to furigana and furiganaPlain handlebars helper functions
* Expose unique expression/reading arrays (and subsequently counts)
* Add {frequencies} marker
Diffstat (limited to 'docs/templates.md')
-rw-r--r-- | docs/templates.md | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/docs/templates.md b/docs/templates.md index 1c9081d2..7425bc4a 100644 --- a/docs/templates.md +++ b/docs/templates.md @@ -44,21 +44,27 @@ This function can be helpful for debugging values when creating templates. ### `furigana` -Converts a definition to its furigana representation. +Converts a definition or expression/reading pair to its furigana representation. <details> <summary>Syntax:</summary> - <code>{{#furigana}}<i><definition></i>{{/furigana}}</code> + <code>{{#furigana}}<i><definition></i>{{/furigana}}</code><br> + <code>{{#furigana <i>expression</i> <i>reading</i>}}{{/furigana}}</code><br> * _`definition`_ <br> The definition to convert. + * _`expression`_ <br> + The expression to convert. + * _`reading`_ <br> + The reading to convert. </details> <details> <summary>Example:</summary> ```handlebars {{#furigana}}{{.}}{{/furigana}} + {{#furigana "読む" "よむ"}}{{/furigana}} ``` Output: @@ -73,21 +79,27 @@ Converts a definition to its furigana representation. ### `furiganaPlain` -Converts a definition to its simplified furigana representation. +Converts a definition or expression/reading pair to its simplified furigana representation. <details> <summary>Syntax:</summary> <code>{{#furiganaPlain}}<i><definition></i>{{/furigana}}</code> + <code>{{#furiganaPlain <i>expression</i> <i>reading</i>}}{{/furiganaPlain}}</code><br> * _`definition`_ <br> The definition to convert. + * _`expression`_ <br> + The expression to convert. + * _`reading`_ <br> + The reading to convert. </details> <details> <summary>Example:</summary> ```handlebars {{~#furiganaPlain~}}{{.}}{{~/furiganaPlain~}} + {{#furiganaPlain "読む" "よむ"}}{{/furiganaPlain}} ``` Output: |