From 053a5eb75d3b8b5f43b0d3f63f6e589e4beb9276 Mon Sep 17 00:00:00 2001 From: froggleston Date: Thu, 17 Oct 2024 15:04:42 +0100 Subject: [PATCH] Import stringr --- DESCRIPTION | 3 ++- NAMESPACE | 1 + R/build_glossary.R | 3 --- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5ef06365..1e1d777a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -89,7 +89,8 @@ Imports: callr, servr, utils, - tools + tools, + stringr Suggests: testthat (>= 3.0.0), covr, diff --git a/NAMESPACE b/NAMESPACE index 0f9a38f8..55323eed 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -3,6 +3,7 @@ export(build_episode_html) export(build_episode_md) export(build_handout) +export(build_glossary) export(build_lesson) export(check_lesson) export(create_episode) diff --git a/R/build_glossary.R b/R/build_glossary.R index 50caf903..4836645f 100644 --- a/R/build_glossary.R +++ b/R/build_glossary.R @@ -167,9 +167,6 @@ get_glossary_links <- function(episode) { hrefs <- xml2::xml_attr(links, "href") glos_links <- links[stringr::str_detect(hrefs, "^https://glosario.carpentries.org/")] - #links <- links[xml2::xml_attr(links, "href") %>% - # stringr::str_detect("^https://glosario.carpentries.org/")] - clean_links <- character() for (link in glos_links) { href <- xml2::xml_attr(link, "href")