redbug312 / markdown-it-multimd-table

Multimarkdown table syntax plugin for markdown-it markdown parser
MIT License
144 stars 37 forks source link

Table inside of list is rendered incorrectly #66

Open joapuiib opened 9 months ago

joapuiib commented 9 months ago

Hello. The plugin breaks the following behavior (See: Table inside of list is rendered incorrectly #325):

Example from markdown-it page

- list item

    | Col1  | Col2 |
    | ----- | ---- |
    | Col1  | Col2 |
redbug312 commented 1 month ago

Sorry for overlooking this issue.

The current release requires exact indentation with the list (2 spaces) to render correctly. It fails when tables have leading spaces, as shown in the example below:

··| Col1  | Col2 |
··| ----- | ---- |
··| Col1  | Col2 |

In the next release, this example will be accepted. However, it will prepend empty cells and this is still inconsistent with the original table plugin. The empty cells are used for the multiline feature to correctly join cells from previous lines. Please let me know if this would be unacceptable.