showdown-furigana-extension
v1.0.3
Published
Furigana support extension for showdown
Downloads
5
Maintainers
Readme
showdown-furigana-extension
Furigana support extension for showdown.
Usage
Install Showdown.
Install extension node module : npm install showdown-furigana-extension --save
var furigana = require('showdown-furigana-extension');
var showdown = new Showdown.converter({extensions:[furigana]});
var html = showdown.makeHtml(src);
How to write furigana with showdown-furigana-extension
Writing furigana above any kanji in HTML5 requires 4 steps :
- write the Kanji
- open a parenthesis, the long one you can find in your Japanese IME (Input Method Editor).
- type the hiragana — one or more — you want to turn into furigana. Hiragana only!
- close your parenthesis – once more, a long one.
For example, typing 福(ふく)
in your markdown document will produce this in HTML5 :
<ruby><rb>福</rb><rp>(</rp><rt>ふく</rt><rp>)</rp></ruby>
And should look like this in your final document : 福(ふく).
Warning : If you can read this, your browser does not support furigana!
If, instead of this, you see hiragana between parentheses, it means your browser (ie. Firefox) does not support the ruby tag. To solve this problem, you can install an extension such as HTML Ruby.
If you get small hiragana above your kanji, \o/ you are done.