You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use a leading '-' to remove topics from a section, e.g. '-topic_name', '-starts_with("foo")'.
AFAIK, this is to allow for exclusion of specific topics in one set of references, for example:
- contents:
- has_keyword("datasets")
- -foodata
This has worked in version 1.6.1 but it no longer does as from 2.0.0 -- most likely because of the changes in #1664. Topics are no longer selected based on the whole pattern vector (select_topics(section$contents, pkg$topics), but one-by-one (purrr::imap(section$contents, content_info, pkg = pkg, section = index)). The above exclusion pattern actually leads to the inclusion of all topics.
Test code:
ref<-list(
list(contents= c("matches('[ab]')", "-b")), # only alist(contents= c("b", "c", "?", "e")) # all but a
)
meta<-list(reference=ref)
pkg<- as_pkgdown(test_path("assets/reference"), override=meta)
lapply(data_reference_index(pkg)$rows, `[[`, "names")
The documentation on topic matching says:
AFAIK, this is to allow for exclusion of specific topics in one set of references, for example:
This has worked in version 1.6.1 but it no longer does as from 2.0.0 -- most likely because of the changes in #1664. Topics are no longer selected based on the whole pattern vector (
select_topics(section$contents, pkg$topics)
, but one-by-one (purrr::imap(section$contents, content_info, pkg = pkg, section = index)
). The above exclusion pattern actually leads to the inclusion of all topics.Test code:
Observed result (in 2.0.2):
Expected result (as in 1.6.1):
The text was updated successfully, but these errors were encountered: