Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown headers #560

Closed
jeroen opened this issue Jan 13, 2017 · 7 comments
Closed

Markdown headers #560

jeroen opened this issue Jan 13, 2017 · 7 comments
Labels
feature a feature request or enhancement markdown ⬇️

Comments

@jeroen
Copy link
Member

jeroen commented Jan 13, 2017

Adding a markdown header yiels a strange error message:

#'  Blabla bla
#' 
#' ## Output streams
#'
#' Blabla

Same happens for underline header

#' Blabla
#'
#' Output streams
#' ---
#'
#' Blabla

This is the error:

> roxygen2::roxygenise()
Error in markdown_rparse(markdown_tags[[xml_name(xml)]](xml), markdown_tags = markdown_tags) : 
  attempt to apply non-function
@gaborcsardi
Copy link
Member

HEaders are not supported, but I agree that the error message should be better.

@jeroen
Copy link
Member Author

jeroen commented Jan 13, 2017

OK. Is there any way to get custom section titles such as e.g. in ?connection manual page?

@gaborcsardi
Copy link
Member

gaborcsardi commented Jan 13, 2017 via email

@jeroen
Copy link
Member Author

jeroen commented Jan 13, 2017

OK thanks :) I assumed it was a layout feature, not a Rd tag. Perhaps we can map markdown headers to @section tags.

@gaborcsardi
Copy link
Member

WEll, @section is a roxygen tag, not Rd. Right now we do a separate markdown parsing for each roxygen tag.

@brodieG
Copy link
Contributor

brodieG commented Mar 4, 2017

Fyi, this gets triggered by having something like #' <hello hello> in the docs, presumably because it tries to interpret it as some kind of markup tag and there is no equivalent value roxygen2:::markdown_tags.

@hadley hadley added feature a feature request or enhancement markdown ⬇️ labels Aug 16, 2017
@hadley hadley closed this as completed in 52cdeb6 Jun 28, 2018
@jarauh
Copy link

jarauh commented Nov 16, 2018

It would be good to mention in the documentation that sections are not supported. The introduction of https://cran.r-project.org/web/packages/roxygen2/vignettes/markdown.html ends with:

See http://commonmark.org/help/ for more about the parser and the markdown language it supports.

This suggests that roxygen2 does work with sections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement markdown ⬇️
Projects
None yet
Development

No branches or pull requests

5 participants