Skip to content

Commit

Permalink
Exclude underscores when finding appendices
Browse files Browse the repository at this point in the history
  • Loading branch information
andrie committed Nov 9, 2022
1 parent e67ab04 commit c75dd79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/build_book.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ appendices <- function(manual, manual_path = "manuals") {
stringr::str_extract("^@appendix (.*)$") %>%
na.omit() %>%
c() %>%
# replace all punctuation except hyphen
gsub(r"([!\"#$%&'()*+,./:;<=>?@[\\]^_`\{|\}~])", "", .) %>%
# replace all punctuation except hyphen and underscore
gsub(r"([!\"#$%&'()*+,./:;<=>?@[\\]^`\{|\}~])", "", .) %>%
gsub("@appendix ", "", .) %>%
gsub("[[:space:]]", "-", .)

Expand Down

0 comments on commit c75dd79

Please sign in to comment.