markdown-it-multimd-table icon indicating copy to clipboard operation
markdown-it-multimd-table copied to clipboard

Table inside of list is rendered incorrectly

Open joapuiib opened this issue 2 years ago • 2 comments

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 |
  • With this plugin enabled: image
  • With this plugin disabled: image

joapuiib avatar Nov 21 '23 16:11 joapuiib

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.

redbug312 avatar Aug 10 '24 14:08 redbug312

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.

"Unacceptable" is a rather strong word IMO🙂 But would these empty cells be visible? If yes, that would be a little ugly. If not, I don't care too much.

c3er avatar Feb 25 '25 19:02 c3er