Issue #6410 resolved

Markdown tables not being properly styled (BB-9928)

Eneko Alonso
created an issue

While markdown tables are properly converted to HTML tables, they lack of important css styles, like borders. This causes the table to look like plain text.

Sample markdown table:

First Header Second Header
Row1 Cell1 Row1 Cell2
Row2 Cell1 Row2 Cell2

Comments (14)

  1. Brian Nguyen staff

    Hi,

    Markdown and by extension our implementation, doesn't have support for tables.

    If you would like to include a ASCII representation of a table, you can do so by wrapping the text in a code block. i.e.

    | First Header | Second Header | 
    |--------------|---------------| 
    |  Row1 Cell1  |  Row1 Cell2   | 
    |  Row2 Cell1  |  Row2 Cell2   |
    

    Cheers, Brian

  2. Eneko Alonso reporter

    Hi Brian,

    Here is the code I pasted before (escaped with three backticks):

    | First Header  | Second Header  |
    |---------------|----------------|
    | Row1 Cell1    |   Row1 Cell2   |
    | Row2 Cell1    |   Row2 Cell2   |
    

    If you paste that code, unindented, on a README.md file, it actually get's properly converted to an HTML table. I encourage you to try it yourself on a repository.

    All I'm asking for is to add some CSS, so the HTML tables on README.md files look good.

    Thanks! Eneko

  3. Travis Spencer

    I don't see any difference in the styling of tables in my README.md files. The markdown is converted to an HTML correctly, but the tables have no borders, no CSS classes of any sort, just plain old table markup. When you say it's resolved, Zach Davis, what exactly did you change?

  4. Mark Walz

    Table styles are not being honored. Centering is not working on columns.

    | First Header  | Second Header  |
    |:-------------:|----------------|
    | Row1 Cell1    |   Row1 Cell2   |
    | Row2 Cell1    |   Row2 Cell2   |
    
  5. Brian Nguyen staff

    Hi Mark,

    This looks to be a separate bug. The markdown cells are correctly being marked as center-aligned, but unfortunately it is using an old, invalid align attribute. I've raised a separate issue for this at #8894. Please watch that issue for updates.

    Cheers, Brian

  6. Log in to comment