[Bug Report]: Indented Table is rendered in markdown editor, but broken in page view #2497

Open
opened 2026-02-05 04:20:35 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @stefanman125 on GitHub (Nov 22, 2021).

Describe the Bug

In the Markdown editor, creating a table under a list renders a valid table in the markdown editor, but breaks the table when exiting the editor and viewing the page.

Steps to Reproduce

  1. Paste the following code and observe the difference in the tables in both the markdown editor, and the page view after exiting the editor.
#### Table 1

| Key | Value |
|-|-|
|Indented|False|

#### Table 2

1. One

    - Item 1
    
    | Key | Value |
    |-|-|
    | Indented | True |

Expected Behaviour

Both tables should look like Table 1 in the page view.

Screenshots or Additional Context

1
2

Exact BookStack Version

v21.04.4

PHP Version

No response

Hosting Environment

Docker compose using linuxserver/bookstack image.

Originally created by @stefanman125 on GitHub (Nov 22, 2021). ### Describe the Bug In the Markdown editor, creating a table under a list renders a valid table in the markdown editor, but breaks the table when exiting the editor and viewing the page. ### Steps to Reproduce 1. Paste the following code and observe the difference in the tables in both the markdown editor, and the page view after exiting the editor. ``` #### Table 1 | Key | Value | |-|-| |Indented|False| #### Table 2 1. One - Item 1 | Key | Value | |-|-| | Indented | True | ``` ### Expected Behaviour Both tables should look like Table 1 in the page view. ### Screenshots or Additional Context ![1](https://user-images.githubusercontent.com/38778523/142805841-db275389-4f9c-4260-9e36-fc9af3eb829a.png) ![2](https://user-images.githubusercontent.com/38778523/142805839-79a71534-7fbf-40ad-b996-6de86db9d911.png) ### Exact BookStack Version v21.04.4 ### PHP Version _No response_ ### Hosting Environment Docker compose using linuxserver/bookstack image.
OVERLORD added the 🐛 Bug> Markdown Editor labels 2026-02-05 04:20:35 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Nov 22, 2021):

Thanks for reporting, this isn't too surprising since tables are not part of the common-mark standard, there will be differences between the front-end & back-end renders.

From my testing, top-level bullet items work fine, gets funky when on nested list items. HTML table syntax should work fine though.

This may be fixed in v2 of https://github.com/thephpleague/commonmark but we can't upgrade to that due to dependency mismatch. Not really sure it's worth addressing before then since it's such as specific edge case scenario that does technically have a workaround.

@ssddanbrown commented on GitHub (Nov 22, 2021): Thanks for reporting, this isn't too surprising since tables are not part of the common-mark standard, there will be differences between the front-end & back-end renders. From my testing, top-level bullet items work fine, gets funky when on nested list items. HTML table syntax should work fine though. This may be fixed in v2 of https://github.com/thephpleague/commonmark but we can't upgrade to that due to dependency mismatch. Not really sure it's worth addressing before then since it's such as specific edge case scenario that does technically have a workaround.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2497