本项目库基于furigana-markdown修改而来! 目标是为Markdown文档预览时可以体现注音符号。
By default, the following formats can be used.
[世界]^(せかい)
[世界]{せかい}
produces
By default, inline matching can also be used. It only works above kanji however.
世界【せかい】
世界{せかい}
produces
By default, furigana is displayed equally spaced above each kanji. Using any of the seperators . . 。 ・
, spacing can be specified (only in the inline format).
小夜時雨【さ・よ・しぐれ】
produces
Pattern matching, enabled by default, also allows the following formats, in which the whole word can be added in kana to the furigana.
食べる【たべる】
食べる{たべる}
produces
By using the basic furigana format, compound words can be matched too.
[取り返す]{とりかえす}
produces
This makes it easier to get the kanji version of the word from an IME without backtracking through the text to place furigana.
npm install
import MDRubyRender from 'markdown-ruby'
var renderer = new marked.Renderer()
MDRubyRender.registerMarked(renderer);