Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue where Markdown syntax would cause table columns to have incorrect lengths #53

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ElisabethJoan
Copy link

@ElisabethJoan ElisabethJoan commented Feb 19, 2023

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.

@tgrosinger
Copy link
Owner

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.

@tgrosinger
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants