Skip to content

Commit

Permalink
Adding the .mdwn Markdown extension. Fixes github#66.
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanveloso committed Aug 5, 2012
1 parent 0fdd4a7 commit c16ac47
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions lib/github/commands/rest2html
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion lib/github/markups.rb
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit c16ac47

Please sign in to comment.