PATCH: first paragraph after item shown correctly

Fujio Nobori <[email protected]>
Newsgroups gmane.comp.web.wiki.moin.devel
Message-ID <[email protected]>
Hello,

I found that the raw text:
{{{
 1. bullet item
  This line should
  be in one line.
}}}
is viewed:
{{{
    1. bullet item
            This line should

            be in one line.
}}}
where it should be:
{{{
    1. bullet item
            This line should be in one line.
}}}

Attached is the patch against tla (patch-280) to fix this
issue.

I would appreciate any comment.

Thank you very much!

-- 
Fujio Nobori                                     il|li
    email: [email protected]                   q|@.@|p
                                              m. ( o ) .m
                                             ~~~~~~~~~~~~~
first_paragraph_after_item_patch_against_280 (text/plain, 876 B)
--- orig/MoinMoin/parser/wiki.py
+++ mod/MoinMoin/parser/wiki.py
@@ -510,6 +510,21 @@
         # Close open paragraphs and list items
         if self._indent_level() != new_level:
             self._close_item(close)
+        else:
+            # don't want the raw text:
+            #    1. bullet item
+            #     This line should
+            #     be in one line.
+            # to be viewd:
+            #    1. bullet item
+            #            This line should
+            #
+            #            be in one line.
+            # of course, it should be:
+            #    1. bullet item
+            #            This line should be in one line.
+            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:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.