changeset 1357:43a3a1ec471c

wiki parser: fix some regex strings
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 20 Aug 2006 21:22:53 +0200
parents 0120ccfbaaa1
children b9fee7c455be
files MoinMoin/parser/text_moin_wiki.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/text_moin_wiki.py	Sun Aug 20 21:06:49 2006 +0200
+++ b/MoinMoin/parser/text_moin_wiki.py	Sun Aug 20 21:22:53 2006 +0200
@@ -39,9 +39,9 @@
     q_string = ur"(%s|%s)" % (sq_string, dq_string) # quoted string
     attachment_schemas = ["attachment", "inline", "drawing"]
     punct_pattern = re.escape(u'''"\'}]|:,.)?!''')
-    punct_no_quote_pattern = re.escape(u'''\}]|:,.)?!''')
+    punct_no_quote_pattern = re.escape(u'''}]|:,.)?!''')
     url_pattern = (u'http|https|ftp|nntp|news|mailto|telnet|wiki|file|irc|' +
-            u'|'.join(attachment_schemas) + 
+            u'|'.join(attachment_schemas) +
             (config.url_schemas and u'|' + u'|'.join(config.url_schemas) or ''))
 
     # some common rules
@@ -52,7 +52,7 @@
         'parent': ur'(?:%s)?' % re.escape(PARENT_PREFIX),
     }
     url_rule = ur'%(url_guard)s(%(url)s)\:(([^\s\<%(punct)s]|([%(punctnq)s][^\s\<%(punct)s]))+|%(q_string)s)' % {
-        'url_guard': u'(^|(?<!\w))',
+        'url_guard': ur'(^|(?<!\w))',
         'url': url_pattern,
         'punct': punct_pattern,
         'punctnq': punct_no_quote_pattern,
@@ -930,7 +930,7 @@
         scan_re = re.compile(rules, re.UNICODE)
         number_re = re.compile(self.ol_rule, re.UNICODE)
         term_re = re.compile(self.dl_rule, re.UNICODE)
-        indent_re = re.compile("^\s*", re.UNICODE)
+        indent_re = re.compile(ur"^\s*", re.UNICODE)
         eol_re = re.compile(r'\r?\n', re.UNICODE)
         self.request.clock.stop('compile_huge_and_ugly')