Fixed issue where Markdown syntax would cause table columns to have incorrect lengths#53
Fixed issue where Markdown syntax would cause table columns to have incorrect lengths#53ElisabethJoan wants to merge 2 commits intotgrosinger:mainfrom
Conversation
…nsistent widths when rows contain a mixture of MD formatting
|
Thank you for opening this PR. If I understand correctly, this is removing the markdown syntax before calculating the width of the cell contents? While that would make it display nicer in Obsidian, it would cause the table to actually no longer be formatted nicely when you look at the plain text in another editor. I think that breaks the intended purpose of this library, since it is not Obsidian specific. I definitely agree that it's annoying to have the columns rendered unevenly in Obsidian, but I don't think the Advanced Tables plugin will be able to resolve that until Obsidian adds additional support for helping edit tables. |
|
It could actually be really interesting to see if we can incorporate this proposal: tgrosinger/advanced-tables-obsidian#199 If this library adds an optional parameter to toggle this functionality on and off I think it could be the best of both worlds. |
The bug was described in this issue tgrosinger/advanced-tables-obsidian#232 on the https://github.com/tgrosinger/advanced-tables-obsidian repository.
I've used the existing remove-markdown npm package but if the addition of extra dependencies is not desired it would be simple to reimplement as a private function as that package is just a single function with a series of regex commands.