markdown-viewer icon indicating copy to clipboard operation
markdown-viewer copied to clipboard

Recognition of Table could be more liberal.

Open poetnerd opened this issue 1 year ago • 2 comments
trafficstars

I was having trouble rendering a table. A table like this:

| key | value

| first | 0

Was rendered raw until I specified it as this:

key value
first 0

Many markdown rendering engines are more liberal in what they accept as a valid table. For example the renderer used by the fossil source code manager https://fossil-scm.org/home/doc/trunk/www/index.wiki (which is the system developed by and used by the SQLite DB community.)

This markdown-viewer would be easier to use, less confusing to those who are getting away with less conservatively formatted tables in markdown if the following two enhancements were made:

  1. Do not require a closing vertical bar.
  2. Do not require the horizontal line at the top to contain vertical bars.

I've just requested this enhancement to another markdown viewer I tried that has the same problem.

poetnerd avatar Apr 21 '24 14:04 poetnerd

Let me try again to provide the currently invalid table (this time as code in Markdown.):

| key | value
--------------------
| first | 0

poetnerd avatar Apr 21 '24 14:04 poetnerd

Thanks for the feedback. The underlying compilers that this extension is using are trying to be compliant with the CommonMark spec. Most likely that syntax is not part of it, but maybe there will be a plugin to support that variation for the table definition syntax.

simov avatar Apr 21 '24 14:04 simov