a57391bb42d7

Fix file extension for wiki links from summary page.
[view raw] [browse files]
author Chris Eldredge <chris.eldredge@gmail.com>
date Mon, 24 Sep 2012 20:56:45 +0100
parents 9f988c0996e4
children 09bb5670eec6
branches/tags (none)
files __init__.py

Changes

--- a/__init__.py	Fri Sep 21 16:23:18 2012 -0400
+++ b/__init__.py	Mon Sep 24 20:56:45 2012 +0100
@@ -106,7 +106,6 @@
 	"""
 	
 	changeid = web.config('web', 'markdown.changeid', 'tip')
-	previewMode = False
 	text = None
 	
 	cctx = web.repo[changeid]
@@ -115,6 +114,7 @@
 		if filename.lower() == 'readme.md' or filename.lower() == 'readme.markdown':
 			fctx = cctx.filectx(filename)
 			text = fctx.data()
+			filesuffix = '.' + filename.split('.')[-1]
 			readmefile = filename
 			break
 	
@@ -136,7 +136,7 @@
 		md = markdown.Markdown(
 			extensions=[ext, 'wikilinks'],
 			extension_configs={
-				'wikilinks' : [('base_url', base_url), ('end_url', ext)]})
+				'wikilinks' : [('base_url', base_url), ('end_url', filesuffix)]})
 		readme = md.convert(text)
 	else:
 		readmefile = "ReadMe"