changeset 2718:3435f31e037e

merged main
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 25 Aug 2007 17:24:52 +0200
parents cd949fc57cd4 (current diff) 03e4091531be (diff)
children d373e273cd7b
files
diffstat 2 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/text_moin_wiki.py	Sat Aug 25 17:24:24 2007 +0200
+++ b/MoinMoin/parser/text_moin_wiki.py	Sat Aug 25 17:24:52 2007 +0200
@@ -893,7 +893,13 @@
                 self.formatter.in_p) and lastpos < len(line):
             result.append(self.formatter.paragraph(1, css_class="line874"))
         if '}}}' in line and len(line[lastpos:].strip()) > 0:
-            result.append(wikiutil.renderText(self.request, Parser, line[lastpos:].strip()))
+            rules = self.formatting_rules.replace('\n', '|')
+            rules = ur'(?P<notword>!%(word_rule)s)|%(rules)s' % {
+                'word_rule': self.word_rule,
+                'rules': rules,
+            }
+            scanning_re = re.compile(rules, re.UNICODE)
+            result.append(self.scan(scanning_re, line[lastpos:].strip(), inhibit_p=inhibit_p))
         else:
             result.append(self.formatter.text(line[lastpos:]))
         return u''.join(result)
--- a/MoinMoin/wikiutil.py	Sat Aug 25 17:24:24 2007 +0200
+++ b/MoinMoin/wikiutil.py	Sat Aug 25 17:24:52 2007 +0200
@@ -255,8 +255,8 @@
         @return: cleaned text
     """
     # we only have input fields with max 200 chars, but spammers send us more
-    l = len(text)
-    if l == 0 or l > max_len:
+    length = len(text)
+    if length == 0 or length > max_len:
         return u''
     else:
         return text.translate(config.clean_input_translation_map)
@@ -843,7 +843,7 @@
         while context and pagename.startswith(PARENT_PREFIX):
             context = '/'.join(context.split('/')[:-1])
             pagename = pagename[PARENT_PREFIX_LEN:]
-        pagename = '/'.join(filter(None, [ context, pagename, ]))
+        pagename = '/'.join(filter(None, [context, pagename, ]))
     elif pagename.startswith(CHILD_PREFIX):
         if context:
             pagename = context + '/' + pagename[CHILD_PREFIX_LEN:]
@@ -2250,3 +2250,4 @@
         pi.append((verb.lower(), args.strip()))
 
     return pi, body
+