From 57ede091c42878f11b33a2c77aa73a71bd4723dd Mon Sep 17 00:00:00 2001 From: substantialnoninfringinguser Date: Wed, 22 Jul 2009 16:18:00 +0100 Subject: [svn] Various bug fixes, using more raw_id fields in admin so it loads faster. I had to put onLoad="contentHeight();" back into the base template. This is a bad solution, I would rather use Martin's, but it wasn't working. --- utils.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'utils.py') diff --git a/utils.py b/utils.py index 69aa9c8..b6ecf40 100644 --- a/utils.py +++ b/utils.py @@ -102,7 +102,7 @@ def href_to_wikilinks(matchobj): if res: return r'[[cavedescription:'+res[0].short_name+'|'+res[0].long_name+']]' else: - return matchobj + return matchobj.group() #except: #print 'fail' @@ -115,13 +115,15 @@ re_subs = [(re.compile(r"\]*\>(.*?)\", re.DOTALL), r"'''\1'''"), (re.compile(r"\]*\>(.*?)\", re.DOTALL), r"====\1===="), (re.compile(r"\]*\>(.*?)\", re.DOTALL), r"=====\1====="), (re.compile(r"\]*\>(.*?)\", re.DOTALL), r"======\1======"), + (re.compile(r'()?>|\s/>()?)', re.DOTALL),r'[[display:\g photo:\g]]'), # (re.compile(r"\(.*?)\", re.DOTALL), r"[[subcave:\1|\2]]"), #assumes that all links with id attributes are subcaves. Not great. #interpage link needed - (re.compile(r"\(.*?)\", re.DOTALL), r"[[cavedescription:\1|\2]]"), #assumes that all links with target ids are subcaves. Not great. + (re.compile(r"\(.*?)\", re.DOTALL), r"[[cavedescription:\1|\2]]"), #assumes that all links with target ids are cave descriptions. Not great. (re.compile(r"\[\([^\s]*).*?\\]", re.DOTALL), r"[[qm:\1]]"), - -# BUGGED! -# (re.compile(r'.*)"?>(?P.*)'),href_to_wikilinks) + + #BUGGED! + (re.compile(r'.*)"?>(?P.*)'),href_to_wikilinks), + ] -- cgit v1.2.3