silverbullet icon indicating copy to clipboard operation
silverbullet copied to clipboard

Markdown table reformat

Open zefhemel opened this issue 3 years ago • 3 comments

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 avatar Jul 14 '22 18:07 zefhemel

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 avatar Aug 05 '22 13:08 zefhemel

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

zefhemel avatar Oct 15 '22 21:10 zefhemel

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

just-be-dev avatar Dec 05 '22 19:12 just-be-dev