Problem with Markdown tables (v21.05.2) #2302

Closed
opened 2026-02-05 03:36:20 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @techauthoruk on GitHub (Jun 23, 2021).

HI,

I have many pages that contain Markdown tables. However, if they have more than 4 columns, they do not display correctly. See the markdown below:

## A Guide to ANSI/ISO Colours for Safety Messages and Signs:

Use the web variants (Hex or RGB) for any online documents.

**Colour** | **Pantone** | **Hex** | **Hex** | **RGB** | **RGB**
--- | :--- | --- | --- | --- | --- | ---
<span style="background-color: #000000"><font color="#ffffff"><b>White</b></span> | --- | #ffffff | #ffffff | 255,255,255 | 255,255,255
<font color="#ffff0d"><b>Yellow</b></font> | PMS 109C | #fedb00 | #ffff0d | 254,219,0 | 255,255,13
<font color="#ff8c00"><b>Orange</b></font> | PMS 151C | #de8703 | #ff8c00 | 222,135,3 | 255,140,0
<font color="#ff0000"><b>Red</b></font> | PMS 186C | #d42e12 | #ff0000 | 212,46,18 | 255,0,0
<font color="#0000ff"><b>Blue</b></font> | PMS 285C | #005ec4 | #0000ff | 0,94,196 | 0,0,255
<font color="#008000"><b>Green</b></font> | PMS 335C | #007a53 | #008000 | 0,122,83 | 0,128,0
<font color="#bb29bb"><b>Purple</b></font> | PMS 259C | #bb29bb | #bb29bb | 187,41,187 | 187,41,187
<font color="#623412"><b>Brown</b></font> | PMS 168C | #623412 | #623412 | 98,52,18 | 98,52,18
<font color="#7c878e"><b>Grey</b></font> | PMS 430C | #7c878e | #7c878e | 124,135,142 | 124,135,142
<font color="#000000"><b>Black</b></font> | PMS Black | #2b2926 | #000000 | 43,41,38 | 0,0,0

...this displays as:

image

If I reduce the columns to 4:

## MD table

Colour | Pantone | Hex | Hex - web
--- | :---: | :---: | :---: |
<span style="background-color: #000000"><font color="#ffffff"><b>White</b></span> | --- | #ffffff | #ffffff 

then it displays correctly:
image

Any ideas what may be causing this behaviour? Its an issue because I now have many broken tables as a result of needing to edit the pages (doesn't seem to affect older pages that have not been edited).

Mark

Originally created by @techauthoruk on GitHub (Jun 23, 2021). HI, I have many pages that contain Markdown tables. However, if they have more than 4 columns, they do not display correctly. See the markdown below: ```html ## A Guide to ANSI/ISO Colours for Safety Messages and Signs: Use the web variants (Hex or RGB) for any online documents. **Colour** | **Pantone** | **Hex** | **Hex** | **RGB** | **RGB** --- | :--- | --- | --- | --- | --- | --- <span style="background-color: #000000"><font color="#ffffff"><b>White</b></span> | --- | #ffffff | #ffffff | 255,255,255 | 255,255,255 <font color="#ffff0d"><b>Yellow</b></font> | PMS 109C | #fedb00 | #ffff0d | 254,219,0 | 255,255,13 <font color="#ff8c00"><b>Orange</b></font> | PMS 151C | #de8703 | #ff8c00 | 222,135,3 | 255,140,0 <font color="#ff0000"><b>Red</b></font> | PMS 186C | #d42e12 | #ff0000 | 212,46,18 | 255,0,0 <font color="#0000ff"><b>Blue</b></font> | PMS 285C | #005ec4 | #0000ff | 0,94,196 | 0,0,255 <font color="#008000"><b>Green</b></font> | PMS 335C | #007a53 | #008000 | 0,122,83 | 0,128,0 <font color="#bb29bb"><b>Purple</b></font> | PMS 259C | #bb29bb | #bb29bb | 187,41,187 | 187,41,187 <font color="#623412"><b>Brown</b></font> | PMS 168C | #623412 | #623412 | 98,52,18 | 98,52,18 <font color="#7c878e"><b>Grey</b></font> | PMS 430C | #7c878e | #7c878e | 124,135,142 | 124,135,142 <font color="#000000"><b>Black</b></font> | PMS Black | #2b2926 | #000000 | 43,41,38 | 0,0,0 ``` ...this displays as: ![image](https://user-images.githubusercontent.com/57015243/123093969-3b13da00-d424-11eb-922f-f9493bf562b6.png) If I reduce the columns to 4: ```html ## MD table Colour | Pantone | Hex | Hex - web --- | :---: | :---: | :---: | <span style="background-color: #000000"><font color="#ffffff"><b>White</b></span> | --- | #ffffff | #ffffff ``` then it displays correctly: ![image](https://user-images.githubusercontent.com/57015243/123094119-6eeeff80-d424-11eb-8199-be6be84a0f8b.png) Any ideas what may be causing this behaviour? Its an issue because I now have many broken tables as a result of needing to edit the pages (doesn't seem to affect older pages that have not been edited). Mark
Author
Owner

@ssddanbrown commented on GitHub (Jun 23, 2021):

Hi @techauthoruk,

We did switch markdown renderers at one point and the new one might handle syntax a bit different and less forgivably.

The first markdown table example provided does appear a little malformed. The content and header have 6 columns whereas the second row (--- | :--- | --- | --- | --- | --- | ---) defines 7 columns. From my testing, fixing just this row (by removing one of the columns) ensures that the whole table renders as expected.

@ssddanbrown commented on GitHub (Jun 23, 2021): Hi @techauthoruk, We did switch markdown renderers at one point and the new one might handle syntax a bit different and less forgivably. The first markdown table example provided does appear a little malformed. The content and header have 6 columns whereas the second row (`--- | :--- | --- | --- | --- | --- | ---`) defines 7 columns. From my testing, fixing just this row (by removing one of the columns) ensures that the whole table renders as expected.
Author
Owner

@techauthoruk commented on GitHub (Jun 24, 2021):

...duh!

Maybe one day I will learn how to count! Apologies for this and thank you for the prompt response.

I will close this and slink away into a dark corner of the room....

@techauthoruk commented on GitHub (Jun 24, 2021): ...duh! Maybe one day I will learn how to count! Apologies for this and thank you for the prompt response. I will close this and slink away into a dark corner of the room....
Author
Owner

@ssddanbrown commented on GitHub (Jun 24, 2021):

@techauthoruk 🤣 No worries! Not the first time a markdown table column count issue has arisen and I'm sure it won't be the last!

@ssddanbrown commented on GitHub (Jun 24, 2021): @techauthoruk :rofl: No worries! Not the first time a markdown table column count issue has arisen and I'm sure it won't be the last!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2302