r-lib / commonmark

High Performance CommonMark and Github Markdown Rendering in R
https://docs.ropensci.org/commonmark/
Other
88 stars 11 forks source link

Output to Rd #1

Closed hadley closed 6 years ago

hadley commented 9 years ago

How hard would it be? Then I could use it in roxygen

jeroen commented 9 years ago

Can you give an example of what the conversion you have in mind? Rd requires a specific structure with \title{}, \description{}, \details{}, etc. What would this look like in markdown?

hadley commented 9 years ago

I was thinking just for inline rd, like stuff you'd put in the details etc.

jeroen commented 9 years ago

OK. I guess if we can map out how the markdown types (p, h1-h5, ol, ul, code, etc) are represented in Rdoc then it shouldn't be too difficult to write a converter.

hadley commented 9 years ago

Yeah, I think it's mostly those (and maybe not even headings), strong and emph, definition lists (if that's in commonmark, can't remember), code blocks (-> preformatted) and tables.

jeroen commented 9 years ago

See also https://github.com/klutometis/roxygen/issues/365.

gaborcsardi commented 9 years ago

Oh, I just saw this. I guess this is exactly what maxygen does.