Markdown Extension: Ruby Markup

This blog renders markdown by HTML::Pipeline that uses the Ruby library of CommonMark1: CommonMarker, which is GitHub’s fork of the reference parser for CommonMark.

CommonMark spec does not have specifications for Ruby Markup. For CommonMarker and the majority of the internet, you write the Ruby markup HTML directly in your markdown document:


However, I was blogging many Japanese posts which I would need to write a lot of HTML. It would be much nicer to have something easy to write the ruby markup.

Finding solutions

I found this thread on CommonMark forum. They are discussing adding ruby syntax support in Markdown but they haven’t concluded yet. So I build my own. This is what I ended up using on this site:


This generates:


Which looks like:



This works great for me because:

It is open sourced at JuanitoFatas/html-pipeline-ruby_markup. Let me know if you have any feedback!