Hello,
seems that the Markdown parser used in git.sr.ht does not handle text
alignment.
In the following example text will always render left-aligned:
https://paste.sr.ht/~jman/9df318b7dc8badf43348bd221f44d96e4f6c5aab
Am I missing something?
Can anyone please remind me which Markdown parser is using Sourcehut and
its project link? I might check out why it doesn't work as expected.
Thanks
On Mon, Jan 1, 2024, at 1:47 PM, jman wrote:
> Can anyone please remind me which Markdown parser is using Sourcehut and> its project link? I might check out why it doesn't work as expected.
Sourcehut uses [mistletoe][1], as well as some [custom code][2] to
render Markdown. I did some digging and wasn't able to determine why
text alignment isn't supported.
[1]: https://github.com/miyuchina/mistletoe
[2]: https://git.sr.ht/~sircmpwn/core.sr.ht/tree/master/item/srht/markdown.py
On 1/1/24 20:35, Noelle Leigh wrote:
> On Mon, Jan 1, 2024, at 1:47 PM, jman wrote:>> Can anyone please remind me which Markdown parser is using Sourcehut and>> its project link? I might check out why it doesn't work as expected.> > Sourcehut uses [mistletoe][1], as well as some [custom code][2] to> render Markdown. I did some digging and wasn't able to determine why> text alignment isn't supported.
The SourceHut markdown renderer keeps a list of allowed
elements/attributes to minimize the attack surface it provides. The
align attributes used for cell alignment are currently not in that list.
I suspect this is just an oversight, though. I submitted a patch [1] to
fix that.
[1]: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/48275
Cheers,
Conrad