HTML::Pipeline::RubyMarkup
HTML::Pipeline::RubyMarkup
provides a HTML::Pipeline
filter to easily write ruby markups in Markdown documents.
Installation
Add this line to your application‘s Gemfile
:
gem "html-pipeline-ruby_markup"
Or install it yourself as:
$ gem install html-pipeline-ruby_markup
Usage
HTML::Pipeline::RubyMarkup
processes Text, so it must come before the
markdown filter.
require "html/pipeline"
require "html/pipeline/ruby_markup"
pipeline = HTML::Pipeline.new [
HTML::Pipeline::RubyMarkup::Filter,
HTML::Pipeline::MarkdownFilter,
]
result = pipeline.call <<-MARKDOWN.strip_heredoc
[漢字(かんじ)]
MARKDOWN
puts result[:output].to_html
prints:
<ruby>
漢字<rp>(</rp><rt>かんじ</rt><rp>)</rp>
</ruby>
Contributing
Please see the CONTRIBUTING.md file.
License
Please see the LICENSE.md file.