redbug312 / markdown-it-multimd-table

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

Tables in lists aren't recognized like they are in plain markdown-it #32

Closed JimPatterson closed 4 years ago

JimPatterson commented 4 years ago

Great plugin, my team is enjoying many of the features.

But we found a bug.

Plain markdown-it tables support being nested in lists like: demo

But that same syntax does not work with this plugin. Instead the table source renders directly like Screenshot from 2020-06-29 19-29-20

I can trick the parser into recognizing the table with:

- list item

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

The keys appear to be:

  1. the first line of the table must be indented so that markdown-it knows the line is part of the list
  2. the first line must not have the | character or you get an extra empty header cell
  3. the rest of the lines of the table can't be indented
redbug312 commented 4 years ago

It seems the issue be automatically closed when commit.

Thanks for this detailed and helpful bug report. It got fixed and would be released as version 4.0.3 soon.