changeset 521:d3a173c26e1c

fixed dl indenting, some cosmetic issues imported from: moin--main--1.5--patch-525
author Thomas Waldmann <tw@waldmann-edv.de>
date Wed, 05 Apr 2006 18:46:11 +0000
parents 77526f8f3ecf
children 3ea8fd50dd53
files ChangeLog MoinMoin/parser/wiki.py MoinMoin/script/export/dump.py MoinMoin/script/lupy/build.py MoinMoin/script/lupy/optimize.py MoinMoin/script/maint/cleancache.py MoinMoin/script/maint/cleanpage.py MoinMoin/script/maint/globaledit.py MoinMoin/script/maint/mkpagepacks.py MoinMoin/script/maint/reducewiki.py docs/CHANGES
diffstat 3 files changed, 26 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Apr 05 08:32:20 2006 +0000
+++ b/ChangeLog	Wed Apr 05 18:46:11 2006 +0000
@@ -2,6 +2,27 @@
 # arch-tag: automatic-ChangeLog--arch@arch.thinkmo.de--2003-archives/moin--main--1.5
 #
 
+2006-04-05 19:46:11 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-525
+
+    Summary:
+      fixed dl indenting, some cosmetic issues
+    Revision:
+      moin--main--1.5--patch-525
+
+    fixed dl indenting, some cosmetic issues
+    
+
+    modified files:
+     ChangeLog MoinMoin/parser/wiki.py
+     MoinMoin/script/export/dump.py MoinMoin/script/lupy/build.py
+     MoinMoin/script/lupy/optimize.py
+     MoinMoin/script/maint/cleancache.py
+     MoinMoin/script/maint/cleanpage.py
+     MoinMoin/script/maint/globaledit.py
+     MoinMoin/script/maint/mkpagepacks.py
+     MoinMoin/script/maint/reducewiki.py docs/CHANGES
+
+
 2006-04-05 09:32:20 GMT	Alexander Schremmer <alex@alexanderweb.de.tla>	patch-524
 
     Summary:
--- a/MoinMoin/parser/wiki.py	Wed Apr 05 08:32:20 2006 +0000
+++ b/MoinMoin/parser/wiki.py	Wed Apr 05 18:46:11 2006 +0000
@@ -315,7 +315,6 @@
 
     def _rule_repl(self, word):
         """Handle sequences of dashes."""
-        ##self.inhibit_p = 1
         result = self._undent() + self._closeP()
         if len(word) <= 4:
             result = result + self.formatter.rule()
@@ -462,7 +461,7 @@
     def _indent_repl(self, match):
         """Handle pure indentation (no - * 1. markup)."""
         result = []
-        if not self.in_li:
+        if not (self.in_li or self.in_dd):
             self._close_item(result)
             self.in_li = 1
             css_class = None
@@ -497,20 +496,16 @@
         """Handle numbered lists."""
         return self._li_repl(match)
 
-
     def _dl_repl(self, match):
         """Handle definition lists."""
         result = []
         self._close_item(result)
-        #self.inhibit_p = 1
         self.in_dd = 1
         result.extend([
             self.formatter.definition_term(1),
             self.formatter.text(match[1:-3].lstrip(' ')),
             self.formatter.definition_term(0),
             self.formatter.definition_desc(1),
-            ## CHANGE: no automatic paragraph
-            ##self.formatter.paragraph(1)
         ])
         return ''.join(result)
 
@@ -528,16 +523,7 @@
         if self._indent_level() != new_level and self.in_table:
             close.append(self.formatter.table(0))
             self.in_table = 0
-        #    #self._close_item(close)
-        #else:
-        #    if not self.line_was_empty:
-        #        self.inhibit_p = 1
-    
-        # Close lists while char-wise indent is greater than the current one
-        #while ((self._indent_level() > new_level) or
-        #       ( new_level and
-        #        (self._indent_level() == new_level) and
-        #        (self.list_types[-1]) != list_type)):
+        
         while self._indent_level() > new_level:
             self._close_item(close)
             if self.list_types[-1] == 'ol':
@@ -548,14 +534,9 @@
                 tag = self.formatter.bullet_list(0)
             close.append(tag)
 
-            del(self.list_indents[-1])
-            del(self.list_types[-1])
+            del self.list_indents[-1]
+            del self.list_types[-1]
             
-            #if new_level:
-            #    self.inhibit_p = 1
-            #else:
-            #    self.inhibit_p = 0
-
             if self.list_types: # we are still in a list
                 if self.list_types[-1] == 'dl':
                     self.in_dd = 1
@@ -579,8 +560,6 @@
             open.append(tag)
             
             self.first_list_item = 1
-            ## Maybe this prevent p creation in lists?
-            ##self.inhibit_p = 1
             self.in_li = 0
             self.in_dd = 0
             
@@ -589,9 +568,6 @@
             close[0:0] = [self.formatter.table(0)]
             self.in_table = 0
         
-        ## Maybe this prevent p creation in lists?
-        ##self.inhibit_p = bool(self.list_types)
-
         return ''.join(close) + ''.join(open)
 
 
@@ -764,8 +740,6 @@
         """Handle section headings."""
         import sha
 
-        ##self.inhibit_p = 1
-
         h = word.strip()
         level = 1
         while h[level:level+1] == '=':
@@ -827,7 +801,6 @@
         word = word.strip()
         if word == '{{{' and not self.in_pre:
             self.in_pre = 3
-            ##self.inhibit_p = 1
             return self._closeP() + self.formatter.preformatted(self.in_pre)
         elif word == '}}}' and self.in_pre:
             self.in_pre = 0
--- a/docs/CHANGES	Wed Apr 05 08:32:20 2006 +0000
+++ b/docs/CHANGES	Wed Apr 05 18:46:11 2006 +0000
@@ -45,6 +45,7 @@
       switch button (this is only a partial fix, but enough to deny the GUI
       mode to your users completely)
     * Fixed XSS issue which could lead to cookie theft etc.
+    * Fixed definition list "same level" indenting.
   
   Other changes:
     * moved back UserPreferences action link from menu to top of page (renaming