commonmark / cmark

CommonMark parsing and rendering library and program in C
Other
1.6k stars 534 forks source link

`cmark -t commonmark` makes little sense #469

Closed tonytonyjan closed 1 year ago

tonytonyjan commented 1 year ago

quoted from man cmark:

cmark converts Markdown formatted plain text to either HTML, groff man, CommonMark XML, LaTeX, or CommonMark,
--to, -t FORMAT
            Specify output format (html, man, xml, latex, commonmark). 

I can understand and knows the scenario of using -t {html,man,xml,latex}, however, I can't fathom what is the use case for -t commonmark.

When do we want to convert markdown file to markdown file?

jgm commented 1 year ago

People sometimes use this to reformat or prettify documents. But if you don't see a use for it, don't use it!

jgm commented 1 year ago

Note: the library provides the commonmark renderer so you can use it to render documents that are generated programatically. We expose this in the command line program too, but it's more useful in the library.

tonytonyjan commented 1 year ago

@jgm Thanks for the explanation! It's very clear.