shurcooL / markdownfmt

Like gofmt, but for Markdown.
MIT License
796 stars 62 forks source link

switching to goldmark #56

Open karelbilek opened 4 years ago

karelbilek commented 4 years ago

Hello,

blackfriday is too buggy and annoying. :) there is a new go-based markdown parser goldmark, now used in huge instead of blackfriday

https://github.com/yuin/goldmark

we have our own fork of markdownfmt, that uses goldmark now. (And changed a few decisions - instead of 1.[tab]list, we just use 1.[space]list- that we can afford now that we don't use blackfriday with its weird list handling)

unfortunately, we have some hacky and ineffective stuff at some points, as one of our usecases is being able to render just some nodes as bytes. And we explicitly don't support lists inside blockquotes, because I was too lazy to do that

Still it's here

https://github.com/Kunde21/markdownfmt

bwplotka commented 4 years ago

I found this very useful, thanks for this!

Would love to have one "proper" markdownfmt that we can use and collab on to finish all the edge cases. Wonder if it's not worth to propose is as a PR to this in another markdownv2 package etc? cc @shurcooL

karelbilek commented 4 years ago

I'm currently quite busy to do this "properly" as a hobby project :(

but it would be nice to take it and finish up, and remove those weird maps that we have there

cc @kunde21 - and also cc @planetscale @dctrwatson - I saw this fork of our fork :)

https://github.com/planetscale/markdownfmt

bwplotka commented 4 years ago

This is crazy because now I need to fork @planetscale repo to fix https://github.com/shurcooL/markdownfmt/issues/58 :scream:

Should we do this properly at some point? ;p

bwplotka commented 4 years ago

Maybe at least we could agree on one fork (:

EDIT: Trying my best to avoid fork: https://github.com/Kunde21/markdownfmt/pull/12 and ported one amazing feature of @planetscale https://github.com/Kunde21/markdownfmt/pull/13

bwplotka commented 3 years ago

BTW, looks like we agreed on one fork.

https://github.com/Kunde21/markdownfmt it is. Actively maintained, feel free to use it. (:

bwplotka commented 3 years ago

https://github.com/shurcooL/markdownfmt/issues/60