Skip to content

Commit

Permalink
fix: ban use of square brackets (#77)
Browse files Browse the repository at this point in the history
* fix: ban use of square brackets

* test: updated test now square brackets not allowed

* rebuilt site
  • Loading branch information
timcadman authored Feb 13, 2025
1 parent 8db067b commit a0c748f
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 8 deletions.
4 changes: 2 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#' @noRd
.get_encode_dictionary <- function() {
encode_list <- list(
input = c("(", ")", "\"", ",", " ", ":", "!", "&", "|", "'", "[", "]", "=", "+", "-", "*", "/", "^", ">", "<", "~", "\n"),
input = c("(", ")", "\"", ",", " ", ":", "!", "&", "|", "'", "=", "+", "-", "*", "/", "^", ">", "<", "~", "\n"),
output = c(
"$LB$", "$RB$", "$QUOTE$", "$COMMA$", "$SPACE$", "$COLON$", "$EXCL$", "$AND$", "$OR$",
"$APO$", "$LSQ$", "$RSQ", "$EQU$", "$ADD$", "$SUB$", "$MULT$", "$DIVIDE$", "$POWER$", "$GT$", "$LT$", "$TILDE$", "$LINE$"
"$APO$", "$EQU$", "$ADD$", "$SUB$", "$MULT$", "$DIVIDE$", "$POWER$", "$GT$", "$LT$", "$TILDE$", "$LINE$"
)
)
return(encode_list)
Expand Down
4 changes: 2 additions & 2 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pandoc: 3.1.11
pandoc: '3.2'
pkgdown: 2.0.9
pkgdown_sha: ~
articles: {}
last_built: 2024-10-28T10:02Z
last_built: 2025-02-11T10:57Z

4 changes: 2 additions & 2 deletions tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ test_that(".tidy_eval_handle_errors fails with correct message when unrecognised

test_that(".get_encode_dictionary returns the expected encoding key", {
expected_encode_list <- list(
input = c("(", ")", "\"", ",", " ", ":", "!", "&", "|", "'", "[", "]", "=", "+", "-", "*", "/", "^", ">", "<", "~", "\n"),
input = c("(", ")", "\"", ",", " ", ":", "!", "&", "|", "'", "=", "+", "-", "*", "/", "^", ">", "<", "~", "\n"),
output = c(
"$LB$", "$RB$", "$QUOTE$", "$COMMA$", "$SPACE$", "$COLON$", "$EXCL$", "$AND$", "$OR$", "$APO$", "$LSQ$", "$RSQ", "$EQU$", "$ADD$", "$SUB$", "$MULT$",
"$LB$", "$RB$", "$QUOTE$", "$COMMA$", "$SPACE$", "$COLON$", "$EXCL$", "$AND$", "$OR$", "$APO$", "$EQU$", "$ADD$", "$SUB$", "$MULT$",
"$DIVIDE$", "$POWER$", "$GT$", "$LT$", "$TILDE$", "$LINE$"
)
)
Expand Down

0 comments on commit a0c748f

Please sign in to comment.