#!/usr/bin/ruby
=begin
Uses MultiMarkdown (must be installed at /usr/local/bin/multimarkdown) to render input,
then converts `{{text}}` to `<u>text</u>`, providing underlines in the HTML output.
=end
input=STDIN.read
def e_sh(str)
str.to_s.gsub(/(?=["\\])/, '\\')
end
puts %x{echo "#{e_sh input}"|/usr/local/bin/multimarkdown}.gsub(/\{\{/,"<u>").gsub(/\}\}/,"</u>")