https://bugs.documentfoundation.org/show_bug.cgi?id=135449

Julien Nabet <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #6 from Julien Nabet <[email protected]> ---
Miklos: reading some docs it seems ending li is optional in html in some cases.
But what about putting it anyway and just use this simple patch:
diff --git a/sw/source/filter/html/htmlnumwriter.cxx
b/sw/source/filter/html/htmlnumwriter.cxx
index f41ac73929f9..a556f4139da4 100644
--- a/sw/source/filter/html/htmlnumwriter.cxx
+++ b/sw/source/filter/html/htmlnumwriter.cxx
@@ -354,18 +354,16 @@ Writer& OutHTML_NumberBulletListEnd( SwHTMLWriter& rWrt,
         }
     }

-    if (rWrt.mbXHTML)
+    // The list is numbered if the previous text node is numbered or any other
previous text
+    // node is numbered.
+    bool bPrevIsNumbered = rInfo.IsNumbered() || *oAtLeastOneNumbered;
+    // XHTML </li> for the list item content, if there is an open <li>.
+    // also for HTML even if it's optional, it can't be bad (see tdf#135449)
+    if ((bListEnd && bPrevIsNumbered) || (!bListEnd &&
rNextInfo.IsNumbered()))
     {
-        // The list is numbered if the previous text node is numbered or any
other previous text
-        // node is numbered.
-        bool bPrevIsNumbered = rInfo.IsNumbered() || *oAtLeastOneNumbered;
-        // XHTML </li> for the list item content, if there is an open <li>.
-        if ((bListEnd && bPrevIsNumbered) || (!bListEnd &&
rNextInfo.IsNumbered()))
-        {
-            HTMLOutFuncs::Out_AsciiTag(
-                rWrt.Strm(), OStringConcatenation(rWrt.GetNamespace() +
OOO_STRING_SVTOOLS_HTML_li),
-                false);
-        }
+        HTMLOutFuncs::Out_AsciiTag(
+          rWrt.Strm(), OStringConcatenation(rWrt.GetNamespace() +
OOO_STRING_SVTOOLS_HTML_li),
+          false);
     }

     if (!bListEnd)

?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to