This is mostly a follow-on to @barry-staes's answer for using Pandoc. Homebrew has it as well, if you're on a Mac:
brew install pandoc
Pandoc supports GFM as an input format via the markdown_github
name.
Output to file
cat foo.md | pandoc -f markdown_github > foo.html
Open in Lynx
cat foo.md | pandoc -f markdown_github | lynx -stdin # To open in Lynx
Open in the default browser on OS X
cat foo.md | pandoc -f markdown_github > foo.html && open foo.html # To open in the default browser on OS X`
TextMate Integration
You can always pipe the current selection or current document to one of the above, as most editors allow you to do. You can also easily configure the environment so that pandoc
replaces the default Markdown processor used by the Markdown bundle.
First, create a shell script with the following contents (I'll call it ghmarkdown
):
#!/bin/bash
# Note included, optional --email-obfuscation arg
pandoc -f markdown_github --email-obfuscation=references
You can then set the TM_MARKDOWN
variable (in Preferences→Variables) to /path/to/ghmarkdown
, and it will replace the default Markdown processor.