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

Table Formatter Can't handle rst alias

Open KenwoodFox opened this issue 2 years ago • 0 comments

When inserting an image via alias into a table, the table formatter tries to treat it as its own column.

Example
#######

+---------+-------------------+
|  Image  |       Text        |
+=========+===================+
| |image| | This is an image. |
+---------+-------------------+


.. |image| image:: image.png
   :width: 125
   :alt: An image

Formats to

Example
#######

+-------+-------+-----+-------------------+
| Image | Text  |     |                   |
+=======+=======+=====+===================+
|       | image |     | This is an image. |
+-------+-------+-----+-------------------+


.. |image| image:: image.png
   :width: 125
   :alt: An image

Which breaks image links and causes weird formatting.

Let me know if there's anything I can do to help! I could try and submit a pr for this if i can figure out where a check to see if a tag is an alias could fit in.

KenwoodFox avatar Jul 19 '23 16:07 KenwoodFox