yuin / goldmark

:trophy: A markdown parser written in Go. Easy to extend, standard(CommonMark) compliant, well structured.
MIT License
3.68k stars 255 forks source link

Question: is there a renderer to output markdown? #119

Closed freb closed 4 years ago

freb commented 4 years ago

I need to make some edits to a markdown document. The most correct approach seems to be parsing the document, altering the AST, then rendering the AST back into markdown text.

Do you know of a markdown renderer for goldmark?

Thank you for the project. And please let me know if there is a better/less annoying place to ask questions. I didn't see a Slack channel or any goldmark issues on Stack Overflow.

yuin commented 4 years ago

Kunde21/markdownfmt seems what you want.

freb commented 4 years ago

Thank you! That's exactly what I was looking for. I guess my question was timely since it looks like the conversion from blackfriday to goldmark took place earlier this month.

myitcv commented 4 years ago

It would be nice to have a standard markdown renderer as part of the github.com/yuin/goldmark module (which is excellent by the way) in order that you can simply round trip from markdown -> AST -> markdown and get back to the same input.

jcorbin commented 4 years ago

It would be nice to have a standard markdown renderer as part of the github.com/yuin/goldmark module (which is excellent by the way) in order that you can simply round trip from markdown -> AST -> markdown and get back to the same input.

Signal boosting this. While I understand that markdown has evolved over the years to be focused mostly on "processing" markdown into html, theres a burgeoning class of programs that use markdown basically as a data store ( e.g. wiki, notes, todo list management, etc ) that would greatly benefit from first class support for roundtripping back into markdown.

saiskee commented 3 years ago

It would be nice to have a standard markdown renderer as part of the github.com/yuin/goldmark module (which is excellent by the way) in order that you can simply round trip from markdown -> AST -> markdown and get back to the same input.

Once again bumping this comment.

ghost commented 1 year ago

Same need here ;-)