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

Can't parse alternative text for figure tag on multiple lines #2080

Closed
maelle opened this issue May 2, 2022 · 2 comments · Fixed by #2084
Closed

Can't parse alternative text for figure tag on multiple lines #2080

maelle opened this issue May 2, 2022 · 2 comments · Fixed by #2084
Labels
bug an unexpected problem or unintended behavior

Comments

@maelle
Copy link
Collaborator

maelle commented May 2, 2022

Say the roxygen2 tags are

#' @section The function output:
#' \figure{logo.png}{Package logo
#' blablablablablabla}

then the Rd is

\figure{logo.png}{Package logo
blablablablablabla}
}

Which creates an error via

if (substr(opt, 1, 9) == "options: ") {

because opt has length 2.

Should

  • pkgdown collapse opt?
  • or roxygen2 do the parsing differently?

A workaround is to write alternative text on one line in the roxygen2 tags.

@maelle maelle added the bug an unexpected problem or unintended behavior label May 2, 2022
@maelle
Copy link
Collaborator Author

maelle commented May 2, 2022

@hadley
Copy link
Member

hadley commented May 2, 2022

Should collapse opt, IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants