changeset 2045:b3ddb4504ec6

text_moin_wiki: bug fix of {{{ aaa {{{\n }}} bbb }}}
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Tue, 29 May 2007 16:34:59 +0200
parents 967d529b31e9
children 1bdbf54a33ff
files MoinMoin/parser/text_moin_wiki.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/text_moin_wiki.py	Sat Jun 02 16:35:58 2007 +0200
+++ b/MoinMoin/parser/text_moin_wiki.py	Tue May 29 16:34:59 2007 +0200
@@ -905,6 +905,12 @@
         lastpos = 0
 
         ###result.append(u'<span class="info">[scan: <tt>"%s"</tt>]</span>' % line)
+        if line.count('{{{') > 1: 
+            self.in_nested_pre = line.count('{{{') -  line.count('}}}')
+            if line.startswith('{{{'):
+                line = line[3:].strip()
+            self.in_pre = 'no_parser'
+            return "%s%s%s" % (self.formatter.paragraph(1), self.formatter.preformatted(1), line)
 
         for match in scan_re.finditer(line):
             # Add text before the match