changeset 553:42c37dcdc314

fixed: no p within lists imported from: moin--main--1.5--patch-557
author Thomas Waldmann <tw@waldmann-edv.de>
date Tue, 11 Apr 2006 14:50:04 +0000
parents 7d46743be355
children e5e529840fcf
files ChangeLog MoinMoin/parser/wiki.py
diffstat 2 files changed, 21 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Apr 11 14:16:13 2006 +0000
+++ b/ChangeLog	Tue Apr 11 14:50:04 2006 +0000
@@ -2,6 +2,20 @@
 # arch-tag: automatic-ChangeLog--arch@arch.thinkmo.de--2003-archives/moin--main--1.5
 #
 
+2006-04-11 15:50:04 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-557
+
+    Summary:
+      fixed: no p within lists
+    Revision:
+      moin--main--1.5--patch-557
+
+    fixed: no p within lists
+    
+
+    modified files:
+     ChangeLog MoinMoin/parser/wiki.py
+
+
 2006-04-11 15:16:13 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-556
 
     Summary:
--- a/MoinMoin/parser/wiki.py	Tue Apr 11 14:16:13 2006 +0000
+++ b/MoinMoin/parser/wiki.py	Tue Apr 11 14:50:04 2006 +0000
@@ -120,8 +120,9 @@
         self.is_u = 0
         self.is_strike = 0
         self.lineno = 0
-        self.in_li = 0
-        self.in_dd = 0
+        self.in_list = 0 # between <ul/ol/dl> and </ul/ol/dl>
+        self.in_li = 0 # between <li> and </li>
+        self.in_dd = 0 # between <dd> and </dd>
         self.in_pre = 0
         self.in_table = 0
         self.is_big = False
@@ -568,6 +569,7 @@
             close[0:0] = [self.formatter.table(0)]
             self.in_table = 0
         
+        self.in_list = self.list_types != []
         return ''.join(close) + ''.join(open)
 
 
@@ -863,7 +865,8 @@
                 result.append(self.formatter.text(line[lastpos:match.start()]))
             
             # Replace match with markup
-            if not (self.inhibit_p or self.in_pre or self.formatter.in_p or self.in_table):
+            if not (self.inhibit_p or self.in_pre or self.formatter.in_p or
+                    self.in_table or self.in_list):
                 result.append(self.formatter.paragraph(1, css_class="line867"))
             result.append(self.replace(match))
             lastpos = match.end()
@@ -871,7 +874,7 @@
         ###result.append('<span class="info">[no match, add rest: <tt>"%s"<tt>]</span>' % line[lastpos:])
         
         # Add paragraph with the remainder of the line
-        if not (self.in_pre or self.inhibit_p or
+        if not (self.in_pre or self.in_li or self.in_dd or self.inhibit_p or
                 self.formatter.in_p) and lastpos < len(line):
             result.append(self.formatter.paragraph(1, css_class="line874"))
         result.append(self.formatter.text(line[lastpos:]))