[Zope3-checkins] SVN: Zope3/trunk/src/zwiki/browser/wikipage.py simplify: there is no need to test against a regular expression if the

Fred L. Drake, Jr. fdrake at gmail.com
Sat Jul 16 03:27:27 EDT 2005


Log message for revision 33330:
  simplify: there is no need to test against a regular expression if the
  response is the same regardless of the outcome
  

Changed:
  U   Zope3/trunk/src/zwiki/browser/wikipage.py

-=-
Modified: Zope3/trunk/src/zwiki/browser/wikipage.py
===================================================================
--- Zope3/trunk/src/zwiki/browser/wikipage.py	2005-07-15 20:30:00 UTC (rev 33329)
+++ Zope3/trunk/src/zwiki/browser/wikipage.py	2005-07-16 07:27:27 UTC (rev 33330)
@@ -197,12 +197,7 @@
 
         # if it's an ordinary url, link to it
         if url.match(m):
-            # except, if preceded by " or = it should probably be left alone
-            if re.match('^["=]', m):     # "
-                return m
-            else:
-                # leave the URL alone; docutils will add the href tag correctly
-                return m
+            return m
 
         # it might be a structured text footnote ?
         elif re.search(r'(?si)<a name="%s"' % (m),text):



More information about the Zope3-Checkins mailing list