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

Comments

@jeroen
Copy link
Member

@jeroen 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
Collaborator

@gaborcsardi gaborcsardi commented Jan 13, 2017

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

@jeroen
Copy link
Member Author

@jeroen 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
Collaborator

@gaborcsardi gaborcsardi commented Jan 13, 2017

@jeroen
Copy link
Member Author

@jeroen 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
Collaborator

@gaborcsardi gaborcsardi commented Jan 15, 2017

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 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.

@jarauh
Copy link

@jarauh 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants