Created
March 31, 2012 18:25
-
-
Save ttscoff/2267373 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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>") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment