Adding the .mdwn Markdown extension. Fixes #66.
Bryan Veloso bryan@revyver.com
Sun, 05 Aug 2012 11:58:42 -0700
2 files changed,
10 insertions(+),
3 deletions(-)
M
lib/github/commands/rest2html
→
lib/github/commands/rest2html
@@ -61,8 +61,15 @@
parts = publish_parts(text, writer=writer, settings_overrides=SETTINGS) if 'html_body' in parts: html = parts['html_body'] - return html.encode('utf-8') + + # publish_parts() in python 2.x return dict values as Unicode type + # in py3k Unicode is unavailable and values are of str type + if isinstance(html, str): + return html + else: + return html.encode('utf-8') return '' if __name__ == '__main__': - print main() + sys.stdout.write("%s%s" % (main(), "\n")) + sys.stdout.flush()
M
lib/github/markups.rb
→
lib/github/markups.rb
@@ -1,4 +1,4 @@
-MD_FILES = /md|mkdn?|mdown|markdown/ +MD_FILES = /md|mkdn?|mdwn|mdown|markdown/ if markup('github/markdown', MD_FILES) do |content| GitHub::Markdown.render(content)