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

Some tables are rendered as invalid CommonMark Markdown 1.2 tables

    XMLWordPrintable

Details

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

    Description

      When rendering tables to markdown/1.2, the following cases produce invalid or wrong Markdown tables:

      • Table without header row (e.g. |a|b / |c|d in xwiki/2.1): the output starts with the | — | — | separator line, which isn't a valid Markdown table.
      • Header cells at the start of every row (e.g. |=h|a / |=h2|b): all rows are considered as header rows, rows are printed on the same line (| h | a || h2 | b |), followed by the separator and no body.
      • Pipe character inside a cell (e.g. |x~|y|z): the pipe isn't escaped so the cell is split in two.
      • Empty table: an exception is thrown.

      Expected

      A valid Markdown table is produced in all cases, preserving the cell content.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: