shuGH / vscode-table-formatter

Table formatter extension for VSCode.
MIT License
49 stars 12 forks source link

Grid table conflict with substitutions #5

Open bavovanachte opened 7 years ago

bavovanachte commented 7 years ago

Hi again,

When trying to reformat the following code, the plugin considers the rst substitution as a separate column, and omits the substitution.


+-------------------+--------+--------+---------+--------+------------------------+
| Methods           | ASIL A | ASIL B | ASIL C  | ASIL D | Evidence or motivation |
+===================+========+========+=========+========+========================+
|                   |        |        | This    |        |                        |
|                   |        |        | Project |        |                        |
+-------------------+--------+--------+---------+--------+------------------------+
| 1a method0        | ``++`` | ``++`` | ``++``  | ``++`` | Comment.               |
+-------------------+--------+--------+---------+--------+------------------------+
| 1b |tb11_subst_1| | ``+``  | ``++`` | ``++``  | ``++`` | Comment2               |
+-------------------+--------+--------+---------+--------+------------------------+
| 1c |tb11_subst_2| | ``+``  | ``++`` | ``++``  | ``++`` | Comment3               |
+-------------------+--------+--------+---------+--------+------------------------+
| 1d method1        | ``+``  | ``+``  | ``+``   | ``+``  | Comment4               |
+-------------------+--------+--------+---------+--------+------------------------+

.. |tb11_subst_1| replace:: Replacement text
.. |tb11_subst_2| replace:: More replacement text

Do you see a way to differentiate between substitutions and table entries? Maybe by looking at whether the | symbol is followed by a space?

shuGH commented 7 years ago

Hi. It was reproduce in my local. But this action is in the specifications.

Now | is regarded as a separator unconditionally. So you can not include | inside a cell.

I may take measures in the future, but do not expect it, sorry.