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

indented \item{}{...} entries rendered incorrectly #1117

Closed
kevinushey opened this issue Aug 28, 2019 · 2 comments
Closed

indented \item{}{...} entries rendered incorrectly #1117

kevinushey opened this issue Aug 28, 2019 · 2 comments
Labels
bug an unexpected problem or unintended behavior rd-translation 🎏
Milestone

Comments

@kevinushey
Copy link
Contributor

kevinushey commented Aug 28, 2019

Reprex:


library(usethis)
library(pkgdown)

tmp <- file.path(tempdir(), "spaces")
usethis::create_package(tmp, open = FALSE)
setwd(tmp)

content <- "
#' Title
#'
#' This is a description.
#'
#' \\describe{
#'
#' \\item{Label}{
#'
#'   This text is indented in a way pkgdown doesn't like.
#'
#' }
#'
#' }
foo <- function() {}
"

writeLines(content, "R/foo.R")
writeLines("export(foo)", "NAMESPACE")
devtools::document()
pkgdown::build_site(tmp, preview = TRUE)

Navigate to the foo reference page:

Screen Shot 2019-08-27 at 8 16 48 PM

Note the item text is rendered as c("", <text>).

@kevinushey
Copy link
Contributor Author

It looks like it might just be the extra newline following the item{label{ bit that causes this.

@hadley
Copy link
Member

hadley commented Aug 29, 2019

Minimal reprex:

library(pkgdown)

rd2html("
\\describe{
\\item{Label}{

  This text is indented in a way pkgdown doesn't like.
}}")
#> [1] "<dl class='dl-horizontal'>"                                                                               
#> [2] "<dt>Label</dt><dd><p>c(\"\", \"  This text is indented in a way pkgdown doesn't like.\\n\")</p></dd></dl>"

Created on 2019-08-29 by the reprex package (v0.3.0)

@hadley hadley added bug an unexpected problem or unintended behavior rd-translation 🎏 labels Aug 29, 2019
@hadley hadley added this to the pkgdown 1.4 milestone Aug 29, 2019
@hadley hadley closed this as completed in bdcbcda Aug 29, 2019
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 rd-translation 🎏
Projects
None yet
Development

No branches or pull requests

2 participants