changeset 4115:f35e8fc79e8b

GUI editor: fix heading level roundtripping
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 20 Sep 2008 14:30:17 +0200
parents 7799099c01cf
children 641814c82116
files MoinMoin/converter/text_html_text_moin_wiki.py MoinMoin/formatter/text_gedit.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/converter/text_html_text_moin_wiki.py	Sat Sep 20 10:38:38 2008 +0200
+++ b/MoinMoin/converter/text_html_text_moin_wiki.py	Sat Sep 20 14:30:17 2008 +0200
@@ -571,7 +571,7 @@
     def process_heading(self, node):
         text = self.node_list_text_only(node.childNodes).strip()
         if text:
-            depth = int(node.localName[1]) - 1
+            depth = int(node.localName[1])
             hstr = "=" * depth
             self.text.append(self.new_line)
             self.text.append("%s %s %s" % (hstr, text.replace("\n", " "), hstr))
--- a/MoinMoin/formatter/text_gedit.py	Sat Sep 20 10:38:38 2008 +0200
+++ b/MoinMoin/formatter/text_gedit.py	Sat Sep 20 14:30:17 2008 +0200
@@ -25,7 +25,7 @@
             self._base_depth = depth
 
         count_depth = max(depth - (self._base_depth - 1), 1)
-        heading_depth = depth + 1
+        heading_depth = depth
 
         # closing tag, with empty line after, to make source more readable
         if not on: