Uploaded image for project: 'Markdown Syntax'
  1. Markdown Syntax
  2. MARKDOWN-96

Headings located inside quotations, groups or list items generate badly nested sections

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 8.10.0
    • 8.9.1
    • markdown/1.2
    • None
    • Unknown

    Description

      When parsing markdown/1.2 content, a heading located inside a container block (quotation, group created from a <div>, list item, etc.) opens a section that is only closed at the end of the document (or by the next heading), i.e. after the container has been closed. The generated events are thus not well nested and the resulting XDOM is wrong (the content following the container ends up in the section).

      Steps to reproduce

      Parse:

      > # Title
      
      after
      

      Result

      beginSection
      beginQuotation
      beginHeader [1, HTitle]
      ...
      endQuotation
      beginParagraph
      onWord [after]
      endParagraph
      endSection
      

      The same happens with a heading inside a <div> group or a list item.

      Expected

      Sections opened inside a container are closed when the container ends, as with the XWiki 2.1 syntax.

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: