Skip to content

Commit

Permalink
don't consult template.params.bslib and note why `template.params.b…
Browse files Browse the repository at this point in the history
…ootswatch`
  • Loading branch information
gadenbuie committed Feb 22, 2024
1 parent bbd6191 commit 3d075d9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions R/theme.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ highlight_styles <- function() {
}

get_bslib_theme <- function(pkg) {
preset <-
pkg$meta[["template"]]$bslib$preset %||%
pkg$meta[["template"]]$params$bslib$preset
preset <- pkg$meta[["template"]]$bslib$preset

if (!is.null(preset)) {
check_bslib_theme(preset, pkg, c("template", "bslib", "preset"))
Expand All @@ -102,6 +100,7 @@ get_bslib_theme <- function(pkg) {

bootswatch <-
pkg$meta[["template"]]$bootswatch %||%
# Historically (< 0.2.0), bootswatch wasn't a top-level template field
pkg$meta[["template"]]$params$bootswatch

if (!is.null(bootswatch)) {
Expand Down

0 comments on commit 3d075d9

Please sign in to comment.