Module: Jekyll::Furigana
- Defined in:
- lib/jekyll/furigana.rb,
lib/jekyll/furigana/version.rb
Constant Summary collapse
- VERSION =
"0.1.2"
Instance Method Summary collapse
Instance Method Details
#furigana(html) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/jekyll/furigana.rb', line 5 def furigana(html) return html unless furi_enabled? html.gsub!(/\[(.+?)\]\((.+?)\)/, "<ruby><rb>\\1</rb><rp>(</rp><rt>\\2</rt><rp>)</rp></ruby>") html end |