@@ -108,7 +108,7 @@ data_home_sidebar <- function(pkg = ".", call = caller_env()) {
108
108
" home.sidebar.structure" ,
109
109
default = default_sidebar_structure(),
110
110
call = call
111
- )
111
+ )
112
112
113
113
# compute all default sections
114
114
default_components <- list (
@@ -122,7 +122,7 @@ data_home_sidebar <- function(pkg = ".", call = caller_env()) {
122
122
)
123
123
124
124
needs_components <- setdiff(structure , names(default_components ))
125
- custom_yaml <- config_pluck_sidebar_components(pkg , needs_components , call = call )
125
+ custom_yaml <- config_pluck_sidebar_components(pkg , needs_components , call = call )
126
126
custom_components <- purrr :: map(custom_yaml , function (x ) {
127
127
sidebar_section(x $ title , markdown_text_block(pkg , x $ text ))
128
128
})
@@ -140,11 +140,11 @@ default_sidebar_structure <- function() {
140
140
config_pluck_sidebar_components <- function (pkg , new_components , call = caller_env()) {
141
141
base_path <- " home.sidebar.components"
142
142
components <- config_pluck_list(pkg , base_path , has_names = new_components , call = call )
143
-
143
+
144
144
for (name in names(components )) {
145
145
component <- components [[name ]]
146
146
component_path <- paste0(base_path , " ." , name )
147
-
147
+
148
148
config_pluck_list(pkg , component_path , has_names = c(" title" , " text" ), call = call )
149
149
config_pluck_string(pkg , paste0(component_path , " .title" ), call = call )
150
150
config_pluck_string(pkg , paste0(component_path , " .text" ), call = call )
@@ -159,7 +159,7 @@ data_home_sidebar_links <- function(pkg = ".") {
159
159
links <- config_pluck(pkg , " home.links" )
160
160
161
161
bug_reports <- pkg $ desc $ get_field(" BugReports" , default = NULL )
162
- if (grepl(" @" , bug_reports )) {
162
+ if (grepl(" @" , bug_reports ) && ! startsWith( bug_reports , " hhtp " ) ) {
163
163
bug_reports <- paste0(" mailto:" , bug_reports )
164
164
}
165
165
0 commit comments