redbug312 / markdown-it-multimd-table

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

Space sensitivity v3 versus v4 #36

Closed dk-teknologisk-mnm closed 3 years ago

dk-teknologisk-mnm commented 3 years ago

Between version 3 and 4 I noticed a change in sensitivity for inserting spaces. If a space is placed in the beginning of a new line, before the first pipe of the table, the space seems to be parsed as cell content.

| Column 1 | Column 2 | Column 3 |
| :------- | :------- | :------- |
 | Row 1   | Content  | Content  |
 | Row 2   | Content  | Content  |

So in v3 the above markdown would be parsed as this: image

And in v4 it gives this: image

Is this a regression bug or a feature?

redbug312 commented 3 years ago

Thanks for the issue. This is kind of a feature, to keep consistent with the multi-line option. (though this is against the behavior of markdown-it) So that users need not add leading pipes when 1st cell of the continuing line is empty, as

column 1 | column 2
---------|---------
row 1    | content \
         | and continue

be like

column 1 column 2

row 1

content and continue