Browse files

Adding the .mdwn Markdown extension. Fixes #66.

  • Loading branch information...
1 parent 0fdd4a7 commit c16ac47743d51f3a51d7db4771d852817a703b18 @bryanveloso bryanveloso committed Aug 5, 2012
Showing with 10 additions and 3 deletions.
  1. +9 −2 lib/github/commands/rest2html
  2. +1 −1 lib/github/markups.rb
View
11 lib/github/commands/rest2html
@@ -61,8 +61,15 @@ def main():
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()
View
2 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)

0 comments on commit c16ac47

Please sign in to comment.