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

Table cell column spans are lost when rendering to CommonMark Markdown 1.2

    XMLWordPrintable

Details

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

    Description

      When rendering a table to markdown/1.2, the colspan parameter of cells is ignored. Cells spanning several columns are rendered as a single cell, so the following cells of the row shift to the left and the table structure is lost (e.g. when converting a page to Markdown, or when saving a Markdown page edited with the WYSIWYG editor).

      The Markdown 1.2 parser supports column spans written with consecutive pipes (e.g. | a || for a cell spanning 2 columns) and generates a colspan parameter for them.

      Steps to reproduce

      Parse and render back to markdown/1.2:

      | a | b | c |
      |---|---|---|
      | d     || e |
      

      Result

      The second row is rendered with 2 normal cells (| d | e |), so e moves to the second column.

      Expected

      The column span is preserved (| d || e |).

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: