silverbulletmd / silverbullet

The knowledge tinkerer's notebook
https://silverbullet.md
MIT License
2.56k stars 188 forks source link

Markdown table reformat #12

Open zefhemel opened 2 years ago

zefhemel commented 2 years ago

For queries, there’s attempt to make markdown tables look “pretty”. It would be cool to have this functionality as a command basically reformatting the markdown table you’re in with the appropriate amount of spacing to make it look good.

So e.g. turn this:

|Name|Age|
+——-+——+
|Pete|38|

Into

|Name|Age|
+----+---+
|Pete|38 |

Or similar

zefhemel commented 2 years ago

The linked code also has some bugs, e.g. it doesn't seem to properly expand based on the header names. This is something to be addressed so I'll also add the bug label.

zefhemel commented 2 years ago

Maybe use https://github.com/darkriszty/MarkdownTablePrettify-VSCodeExt

zephraph commented 1 year ago

https://github.com/tgrosinger/md-advanced-tables might be a good option. It's the underpinnings of the advanced tables plugin in obsidian.