changeset 2715:a17289d3a174

text_moin_wiki: replaced wikiutil.renderText by recursive scan call
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Thu, 23 Aug 2007 23:47:31 +0200
parents eb37036e3350
children 03e4091531be
files MoinMoin/parser/text_moin_wiki.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/text_moin_wiki.py	Thu Aug 23 21:40:48 2007 +0200
+++ b/MoinMoin/parser/text_moin_wiki.py	Thu Aug 23 23:47:31 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)