redbug312 / markdown-it-multimd-table

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

colspan not rendered properly #67

Closed carlo161 closed 7 months ago

carlo161 commented 8 months ago

Hello, I am trying to design a specific table in Joplin but I could not find out how to do it. With the following:

| :---: | :---: | :---: | :---: |
| a ||| b |
| c || d  | ^^ |
| e | f || ^^ |
| ^^ | g || ^^ |
| ^^ | h || ^^ |
| ^^ |  || ^^ |

I expect the table rendered in 4 columns and the "c" cell that spans 2 columns. But I obtain the whole table in 3 columns and the "c", "d", "e" and "f" cells with the same colspan.

image

Am I doing something wrong?

nxjniexiao commented 7 months ago

I had a similar problem. But I don't think it's a bug of markdown-it-multimd-table, because the colspan attribute of <td> is correct. If we add a row, the table will display correctly.

| :---: | :---: | :---: | :---: |
| a | a | a | a |
| a ||| b |
| c || d  | ^^ |
| e | f || ^^ |
| ^^ | g || ^^ |
| ^^ | h || ^^ |
| ^^ |  || ^^ |

Rendering result:

a a a a
a b
c d
e f
g
h
carlo161 commented 7 months ago

Thanks, I could solve by adding a row below or also by adding the header row. Probably to be rendered properly at least one row should have really 4 columns.