vscode-table-formatter icon indicating copy to clipboard operation
vscode-table-formatter copied to clipboard

[RST] Error with table directive

Open mapio opened this issue 6 years ago • 0 comments

If the Grid Table has leading spaces in front of the rows, the extension returns an error.

This impacts with the reStructuredText directive for tables, where to add a title (and other configuration for the table rendering) one should be able to align the table with the directive (adding leading spaces).

In the valid reStructuredText document

+
||Mon|Tue|Wed|Thu|Fri|
+=
|田中|(^^)|(xx)|(xx)|('')|(^^)|
-+
|鈴木|(^^)|(^^)|('')|(xx)|(^^)|
+


.. table:: Truth table for "not"
   :widths: auto

   +
   ||Mon|Tue|Wed|Thu|Fri|
   +=
   |田中|(^^)|(xx)|(xx)|('')|(^^)|
   -+
   |鈴木|(^^)|(^^)|('')|(xx)|(^^)|
   +

the first table gets formatted correctly, while the second one remains unchanged and the following error is reported

Running the contributed command: 'extension.table.formatCurrent' failed.

I'm not enough into VSCode extensions, but I bet it's quite a minor issue… can someone please look into it?

The extension is quite useful and powerful, it's a pity that this small defect makes using it a bit cumbersome for some cases.

mapio avatar Nov 13 '19 09:11 mapio