Lua Table to Markdown String

Hello! When I do something like this:

${{a = "b", c = "d"}}

The lua table gets formatted as a markdown table as expected. However, using tostring({a = "b", c = "d"}) gives me {a = b, c = d} instead. This is expected.

My question is: Is there a built-in function (or plans for one) like toMarkdownString(luaObj) which would give me the string version of the markdown table that I received in ${{a = "b", c = "d"}}? Something like:

|a|c|
|-|-|
|b|d|

Instead of:

{a = b, c = d}

Thank you in advance!

@Shnawblle
This is what I use currently for displaying tables: b717dd0 — paste.sr.ht (put it in a space-lua block). Examples are in the link (scroll down).

@stag
I am getting a 404 when clicking the link. Could it be broken? :sweat_smile:

@Shnawblle
oops, looks like i pasted the wrong link :<

it should be fixed now, sorry about that!