# HG changeset patch
# User Josef Meier (jo.meier@gmx.de)
# Date 1250020302 -7200
# Node ID 1d407a2b8aff4be154f89c1ee5442384f13124d1
# Parent  a6cffa0032be9a6ea4ee310e72e53829de6bd699
Fixes a bug with empty list items in the GUI editor.
See also http://www.moinmo.in/MoinMoinPatch/GuiRemoveEmptyListItems

diff -r a6cffa0032be -r 1d407a2b8aff MoinMoin/converter/text_html_text_moin_wiki.py
--- a/MoinMoin/converter/text_html_text_moin_wiki.py	Tue Aug 11 21:50:33 2009 +0200
+++ b/MoinMoin/converter/text_html_text_moin_wiki.py	Tue Aug 11 21:51:42 2009 +0200
@@ -682,6 +682,12 @@
         found = False
         need_indent = False
         pending = []
+        
+        # If this is a empty list item, we just terminate the line
+        if node.childNodes.length == 0:
+            self.text.append(self.new_line)
+            return
+        
         for i in node.childNodes:
             name = i.localName
 
