Uploaded image for project: 'XWiki Rendering'
  1. XWiki Rendering
  2. XRENDERING-619

Lists with nested paragraphs are incorrectly converted to XWiki syntax

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 12.10.10, 13.9, 13.4.5
    • Syntax - xwiki/2.1
    • None
    • Unknown

    Description

      Having paragraphs (or other types of content) in several list items leads to a missing line break before the first inner list item in the XWiki 2.1 syntax. Further, the use of a group syntax inside the outer list seems questionable as it is not required. The test case below is passing both in the current version and in the LTS version(s) but the XWiki 2.1 syntax in it is clearly buggy:

      .#-----------------------------------------------------
      .input|xhtml/1.0
      .# Testing ordered lists with nested content
      .#-----------------------------------------------------
       <ol>
         <li>
           Paragraph 5
           <ol>
             <li>Paragraph 5.1
               <ol>
                 <li>Paragraph 5.1.1
                 <p>Some text.</p>
                 </li>
               </ol>
             </li>
             <li>Paragraph 5.2
               <ol>
                 <li>Paragraph 5.2.1
                   <p>Example notes:</p>
                 </li>
               </ol>
             </li>
           </ol>
         </li>
       </ol>
      .#-----------------------------------------------------
      .expect|xwiki/2.1
      .#-----------------------------------------------------
      1. (((
      Paragraph 51. Paragraph 5.1
      11. Paragraph 5.1.1(((
      Some text.
      )))
      1. Paragraph 5.2
      11. Paragraph 5.2.1(((
      Example notes:
      )))
      )))
      .#-----------------------------------------------------
      .expect|event/1.0
      .#-----------------------------------------------------
      beginDocument
      beginList [NUMBERED]
      beginListItem
      onWord [Paragraph]
      onSpace
      onWord [5]
      beginList [NUMBERED]
      beginListItem
      onWord [Paragraph]
      onSpace
      onWord [5]
      onSpecialSymbol [.]
      onWord [1]
      beginList [NUMBERED]
      beginListItem
      onWord [Paragraph]
      onSpace
      onWord [5]
      onSpecialSymbol [.]
      onWord [1]
      onSpecialSymbol [.]
      onWord [1]
      beginGroup
      beginParagraph
      onWord [Some]
      onSpace
      onWord [text]
      onSpecialSymbol [.]
      endParagraph
      endGroup
      endListItem
      endList [NUMBERED]
      endListItem
      beginListItem
      onWord [Paragraph]
      onSpace
      onWord [5]
      onSpecialSymbol [.]
      onWord [2]
      beginList [NUMBERED]
      beginListItem
      onWord [Paragraph]
      onSpace
      onWord [5]
      onSpecialSymbol [.]
      onWord [2]
      onSpecialSymbol [.]
      onWord [1]
      beginGroup
      beginParagraph
      onWord [Example]
      onSpace
      onWord [notes]
      onSpecialSymbol [:]
      endParagraph
      endGroup
      endListItem
      endList [NUMBERED]
      endListItem
      endList [NUMBERED]
      endListItem
      endList [NUMBERED]
      endDocument
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              MichaelHamann Michael Hamann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: