Skip to content

feature: Improve handling of whitespace in tables with links in their cells #175

@MoonsilverTV

Description

@MoonsilverTV

Is your feature request related to a problem? Please describe.

The issue arises when working with a table that contains links of varying size in the markdown code and the user elects to vertically align table columns in the code, such as here:
image
which then renders as:
image
This wastes a lot of screen space on white space and makes the table hard to read.

Describe the solution you'd like

It would be preferable if the table rendered as such, with the padding stripped:
image

Describe alternatives you've considered

The user could elect to not vertically align the pipes of the columns. But this makes the markdown document more difficult to use for other people viewing it in plain text (such as coworkers not using this plugin).
image

Additional information

The relevant section of the table for your convenience:

| Points To                                                                                                                                                                    | Level   |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| [[TTRPG/WWN/Caeraema/Locations/Pike Cave/_Pike Cave\|Pike Cave]]                                                                                                             | Low     |
| [[TTRPG/WWN/Caeraema/Locations/Floria's Tower/_Floria's Tower\|Floria's Tower]]                                                                                              | Low     |
| [[TTRPG/WWN/Caeraema/Locations/The Sunken Fane/_The Sunken Fane\|The Sunken Fane]]                                                                                           | Low     |
| [[TTRPG/WWN/Caeraema/Locations/The Sunken Fane/_The Sunken Fane\|The Sunken Fane]]                                                                                           | Low     |
| [[TTRPG/WWN/Caeraema/Locations/The Sunken Fane/_The Sunken Fane\|The Sunken Fane]]                                                                                           | Low     |
| [[TTRPG/WWN/Caeraema/Locations/Ruins of Stormwatch/_Ruins of Stormwatch\|Ruins of Stormwatch]]                                                                               | Low     |
| [[_The Haunted Mill\|The Haunted Mill]]                                                                                                                                      | Low     |
| [[_The Whispering Hollow]]                                                                                                                                                   | Low     |
| [[_The Whispering Hollow]]                                                                                                                                                   | Low     |
| [[_The Logging Venture]]                                                                                                                                                     | Low     |
| [[_Marauder Cave\|Marauder Cave]]                                                                                                                                            | Low     |
| [[_Owl's Roost\|Owl's Roost]]                                                                                                                                                | Low     |
| [[_Blighted Orchard]]                                                                                                                                                        | Low     |
| [[_Gloomwood Asylum\|Gloomwood Asylum]]                                                                                                                                      | Low     |
| [[_Witchfire Plains\|Witchfire Plains]]                                                                                                                                      | Low/Mid |
| [[_The Bloodpit]]                                                                                                                                                            | Low/Mid |
| [[_Titan Shrine\|Titan Shrine]]                                                                                                                                              | Low     |
| [[_Alatryn's Tower\|Alatryn's Tower]]                                                                                                                                        | Low     |
| [[_Passing Forest Chapel\|Passing Forest Chapel]]                                                                                                                            | Low     |
| [[TTRPG/WWN/Caeraema/Locations/Serpent's Isle/_Serpent's Isle\|Serpent's Isle]]                                                                                              | Mid     |
| [[TTRPG/WWN/Caeraema/Locations/Serpent's Isle/_Serpent's Isle\|Serpent's Isle]]                                                                                              | Mid     |
| [[_Goblin-Kin Caves]]                                                                                                                                                        | Mid     |
| [[_Jungle Fever Hollow\|Jungle Fever Hollow]]                                                                                                                                | Mid     |
| [[_Necrotic Glade]]                                                                                                                                                          | Mid     |
| [[_Quicksilver Pool\|Quicksilver Pool]]                                                                                                                                      | Mid     |
| [[_Toxic Fungus Hollow\|Toxic Fungus Hollow]]                                                                                                                                | Mid     |
| [[_Mangrove Cove]]                                                                                                                                                           | Mid     |
| [[_Bog of Eternal Rain]]                                                                                                                                                     | Mid     |
| [[_Bloodwood Grove]]                                                                                                                                                         | Mid     |
| [[_Shipwreck Cove]]                                                                                                                                                          | Mid     |
| [[_Jungle Sinkhole]]                                                                                                                                                         | Mid     |
| [[_Wyrmfang Bluff]]                                                                                                                                                          | Mid     |
| [[_Greybeard's Rest]]                                                                                                                                                        | Any     |
| [[_Soulfire Crag]]                                                                                                                                                           | Mid     |
| [[_Serpent's Gorge]]                                                                                                                                                         | Mid     |
| [[_Starfall Observatory]]                                                                                                                                                    | Any     |
| [[_Bloodfang Caverns]]                                                                                                                                                       | Mid     |
| [[_Dwarven Bridge Ruins]]                                                                                                                                                    | Mid     |
| [[_Dwarven Lighthouse]]                                                                                                                                                      | Mid     |
| [[_Golem Graveyard]]                                                                                                                                                         | Mid     |
| [[_Thunderpeak Plateau]]                                                                                                                                                     | Mid     |
| [[_Moonshadow Plateau]]                                                                                                                                                      | Mid     |
| [[_Bonegrinder Peak]]                                                                                                                                                        | Mid     |
| [[TTRPG/WWN/Caeraema/Locations/Thaladrimarixtur, The Eternal Blizzard's Lair/_Thaladrimarixtur, The Eternal Blizzard's Lair\|Thaladrimarixtur, The Eternal Blizzard's Lair]] | High    |

I recognize that this issue can be somewhat mitigated by having shorter links and then deleting the whitespace and ---s causing a lot of the padding, but this issue would also exist for http hyperlinks which cannot necessarily be shortened in this way.

Thank you for this terrific plugin and I hope you have a wonderful day <3

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions