takumisoft68 / vscode-markdown-table

A vscode extension to add markdown table features.
Apache License 2.0
105 stars 10 forks source link

Drop requirement for first character to be a pipe `|`. Pipes seperate columns in markdown. #47

Open JohnLukeBentley opened 2 years ago

JohnLukeBentley commented 2 years ago

I request the requirement for first character to be a pipe |, be dropped.

For example, the following table is a valid markdown table:

First Header  | Second Header
------------- | -------------
Content Cell  |        Content Cell
Content Cell        | Content Cell

However executing the vscode-markdown-table command "Markdown Table: Format all tables" will have no effect. The extension does not recognize this as a markdown table.

On the other hand the following ...

| First Header  | Second Header
| ------------- | -------------
| Content Cell  |        Content Cell
| Content Cell        | Content Cell

... will be recognized and correctly formatted as following the extension's "Markdown Table: Format all tables" command.

To be clear I think either table should be recognized and formatted.

In most, if not all, of the various markdown standards that support tables with a pipe |, the pipe is a separator of columns, not an opener.

takumisoft68 commented 2 years ago

I'm trying to allow tables not have begining |. But unfortunately it's difficult.

Because all implementations in this extention assume that "| must be in the begining of line".

JohnLukeBentley commented 2 years ago

Thanks @takumisoft68, see what you can do.