Skip to content

Commit

Permalink
work around pkgdown rendering issue
Browse files Browse the repository at this point in the history
  • Loading branch information
salim-b committed Apr 14, 2023
1 parent 9794fb4 commit 6c39a77
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 10 deletions.
8 changes: 4 additions & 4 deletions R/pkgpurl.gen.R
Original file line number Diff line number Diff line change
Expand Up @@ -785,16 +785,16 @@ run_nopurl_rmd <- function(path = ".",
#'
#' ```{r, results = "asis", echo = FALSE}
#' brio::read_lines("snippets/simplified_example.Rmd") %>%
#' c(paste(pal::as_string(rep("`", 4L)), "rmd"), ., pal::as_string(rep("`", 4L))) %>%
#' c(paste(pal::as_string(rep("`", 4L)), "md"), ., pal::as_string(rep("`", 4L))) %>%
#' pal::cat_lines()
#' ```
#'
#' ...yields this pkgdown index (converted [to YAML][yaml::as.yaml()]):
#'
#' ```{r, comment = "", echo = FALSE}
#' brio::read_file("snippets/simplified_example.Rmd") %>%
#' gen_pkgdown_ref() %>%
#' yaml::as.yaml() %>%
#' brio::read_file("snippets/simplified_example.Rmd") |>
#' gen_pkgdown_ref() |>
#' yaml::as.yaml() |>
#' cat()
#' ```
#'
Expand Down
13 changes: 9 additions & 4 deletions Rmd/pkgpurl.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,11 @@ run_nopurl_rmd <- function(path = ".",

### `gen_pkgdown_ref`

TODO:

- Once [issue #2298](https://github.com/r-lib/pkgdown/issues/2298) is fixed, change the code block lang ID in the "Parsing example" below from `md` back to
`rmd`.

NOTES:

- The pkgdown reference supports a max. of 2 hierarchy levels.
Expand Down Expand Up @@ -954,16 +959,16 @@ NOTES:
#'
#' ```{r, results = "asis", echo = FALSE}
#' brio::read_lines("snippets/simplified_example.Rmd") %>%
#' c(paste(pal::as_string(rep("`", 4L)), "rmd"), ., pal::as_string(rep("`", 4L))) %>%
#' c(paste(pal::as_string(rep("`", 4L)), "md"), ., pal::as_string(rep("`", 4L))) %>%
#' pal::cat_lines()
#' ```
#'
#' ...yields this pkgdown index (converted [to YAML][yaml::as.yaml()]):
#'
#' ```{r, comment = "", echo = FALSE}
#' brio::read_file("snippets/simplified_example.Rmd") %>%
#' gen_pkgdown_ref() %>%
#' yaml::as.yaml() %>%
#' brio::read_file("snippets/simplified_example.Rmd") |>
#' gen_pkgdown_ref() |>
#' yaml::as.yaml() |>
#' cat()
#' ```
#'
Expand Down
79 changes: 78 additions & 1 deletion docs/dev/reference/gen_pkgdown_ref.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/gen_pkgdown_ref.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6c39a77

Please sign in to comment.