aboutsummaryrefslogtreecommitdiff
path: root/docs/templates.md
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-11-28 14:30:50 -0500
committerGitHub <noreply@github.com>2020-11-28 14:30:50 -0500
commit008ffdb6bffc2855957be948a24c9e07730501d6 (patch)
treebe6642b030011f0007aad1025da3c5accd0d9a54 /docs/templates.md
parent94d63f4f87a61f7e42ea44d8100ea11d5ccdbce0 (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.md18
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>&lt;definition&gt;</i>{{/furigana}}</code>
+ <code>{{#furigana}}<i>&lt;definition&gt;</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>&lt;definition&gt;</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: