all repos — markup @ c16ac47743d51f3a51d7db4771d852817a703b18

The code we use to render README.your_favorite_markup

Adding the .mdwn Markdown extension. Fixes #66.
Bryan Veloso bryan@revyver.com
Sun, 05 Aug 2012 11:58:42 -0700
commit

c16ac47743d51f3a51d7db4771d852817a703b18

parent

0fdd4a75ec5013e038423616368e79bdec6ff605

2 files changed, 10 insertions(+), 3 deletions(-)

jump to
M lib/github/commands/rest2htmllib/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.rblib/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)