# HG changeset patch # User theaspect@gmail.com # Date 1368454936 -25200 # Node ID c49ba42e5f0e80663fae36755cb5c83130bd37ac # Parent 9ebbaae191002d5dd6c0dbd3da8053323ddbf63d Fix render of nested folders diff -r 9ebbaae19100 -r c49ba42e5f0e __init__.py --- a/__init__.py Mon May 13 19:13:41 2013 +0700 +++ b/__init__.py Mon May 13 21:22:16 2013 +0700 @@ -65,6 +65,9 @@ f = req.form.get('file', [''])[0] parts = os.path.splitext(f) + if not parts[-1] == '.markdown' and not parts[-1] == '.md': + return orig(web, req, tmpl) + try: fctx = webutil.filectx(web.repo, req) text = fctx.data().decode("utf-8") @@ -77,9 +80,6 @@ if util.binary(text): return webcommands.rawfile(web, req, tmpl) - if not parts[1] == '.markdown' and not parts[1] == '.md': - return orig(web, req, tmpl) - md = markdown.Markdown(extensions=['wikilinks(base_url={0},end_url={1})'.format('', parts[1])]) html = md.convert(text).encode("utf-8")