diff options
Diffstat (limited to 'docs/templates.md')
-rw-r--r-- | docs/templates.md | 62 |
1 files changed, 60 insertions, 2 deletions
diff --git a/docs/templates.md b/docs/templates.md index f1777fde..be17c30a 100644 --- a/docs/templates.md +++ b/docs/templates.md @@ -539,8 +539,8 @@ Returns the type of a value. <details> <summary>Syntax:</summary> - <code>{{#typeof <i>value</i>}}{{/get}}</code><br> - <code>{{#typeof}}<i>value</i>{{/get}}</code><br> + <code>{{#typeof <i>value</i>}}{{/typeof}}</code><br> + <code>{{#typeof}}<i>value</i>{{/typeof}}</code><br> * _`value`_ <br> The value to check. @@ -775,6 +775,64 @@ same as the system used for generating popup and search page dictionary entries. </details> +### `hiragana` + +Converts katakana text to hiragana. + +<details> + <summary>Syntax:</summary> + + <code>{{#hiragana <i>value</i>}}{{/hiragana}}</code><br> + <code>{{#hiragana}}<i>value</i>{{/hiragana}}</code><br> + + * _`value`_ <br> + The text to convert. +</details> +<details> + <summary>Example:</summary> + + ```handlebars + {{#hiragana "よみちゃん ヨミちゃん ヨミチャン"}}{{/hiragana}} + {{#hiragana}}よみちゃん ヨミちゃん ヨミチャン{{/hiragana}} + ``` + + Output: + ```html + よみちゃん よみちゃん よみちゃん + よみちゃん よみちゃん よみちゃん + ``` +</details> + + +### `katakana` + +Converts hiragana text to katakana. + +<details> + <summary>Syntax:</summary> + + <code>{{#katakana <i>text</i>}}{{/katakana}}</code><br> + <code>{{#katakana}}<i>text</i>{{/katakana}}</code><br> + + * _`text`_ <br> + The text to convert. +</details> +<details> + <summary>Example:</summary> + + ```handlebars + {{#hiragana "よみちゃん ヨミちゃん ヨミチャン"}}{{/hiragana}} + {{#hiragana}}よみちゃん ヨミちゃん ヨミチャン{{/hiragana}} + ``` + + Output: + ```html + ヨミチャン ヨミチャン ヨミチャン + ヨミチャン ヨミチャン ヨミチャン + ``` +</details> + + ## Legacy Helpers Yomichan has historically used Handlebars templates to generate the HTML used on the search page and results popup. |