Skip to content

Commit 35db938

Browse files
authored
Merge pull request #769 from vaerksted/main
2 parents aafe66f + 498dcd1 commit 35db938

26 files changed

+32
-32
lines changed

NEWS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
* `ansi_collapse(x, trunc = 1, style = "head")` now indeed shows one
5151
element if `length(x) == 2`, as documented (@salim-b, #572).
5252

53-
* `ansi_collapse()` gains a `sep2` argument to specify a seperate separator
53+
* `ansi_collapse()` gains a `sep2` argument to specify a separate separator
5454
for length-two inputs. It defaults to `" and "` which, in conjunction with
5555
the other defaults, produces a collapsed string that fully adheres to the
5656
[serial comma](https://en.wikipedia.org/wiki/Serial_comma) rules.
@@ -147,7 +147,7 @@
147147
* cli exit handlers are now compatible again with the withr package (#437).
148148

149149
* cli functions now keep trailing `\f` characters as newlines.
150-
They also keep multiple consecutive `\f` as multiple newlinees (#491).
150+
They also keep multiple consecutive `\f` as multiple newlines (#491).
151151

152152
* `{}` substitutions within inline styles are now formatted correctly.
153153
E.g. `{.code download({url})}` will not add backticks to `url`, and

R/ansiex.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ ansi_strsplit <- function(x, split, ...) {
393393
#' @family ANSI string operations
394394
#' @export
395395

396-
# TODO: show wide Unicode charadcters, once they work in asciicast
396+
# TODO: show wide Unicode characters, once they work in asciicast
397397

398398
ansi_align <- function(
399399
text,
@@ -572,7 +572,7 @@ ansi_strwrap <- function(
572572
xs <- xs[-1]
573573
}
574574
# At this point, we have as many marks as many newlines we need
575-
# But (except for the begnning) we need one less empty lines than
575+
# But (except for the beginning) we need one less empty lines than
576576
# newlines, because an empty line corresponds to two newlines at
577577
# the end of a non-empty line.
578578
del <- which(xs[-1] == mark & xs[-length(xs)] != mark) + 1L
@@ -1120,7 +1120,7 @@ ansi_grep_internal <- function(fun, pattern, x, ...) {
11201120

11211121
#' Like [base::nzchar()], but for ANSI strings
11221122
#'
1123-
#' @param x Charcater vector. Other objects are coarced using
1123+
#' @param x Character vector. Other objects are coerced using
11241124
#' [base::as.character()].
11251125
#' @param ... Passed to [base::nzchar()].
11261126
#' @export

R/cliapp-docs.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ NULL
540540
#'
541541
#' The `.file` style now automatically creates a `file:` hyperlink.
542542
#' Because `file:` hyperlinks must contain an absolute path, cli tries to
543-
#' convert relative paths, and paths starting with `~` to aboslute path.
543+
#' convert relative paths, and paths starting with `~` to absolute path.
544544
#'
545545
#' ```{asciicast links-file-1}
546546
#' cli_text("... edit your {.file ~/.Rprofile} file.")

R/diff.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ get_diff_chunks <- function(lcs, context = 3L) {
185185

186186
# change to include context chunks
187187
if (context > 0) {
188-
# calculae the end before updating the begin
188+
# calculate the end before updating the begin
189189
op_end <- chunks$op_begin + chunks$op_length - 1 + 1
190190
op_end[op_end > nrow(lcs)] <- nrow(lcs)
191191
chunks$op_begin <- chunks$op_begin - 1

R/errors.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ err <- local({
828828

829829
# Error parts:
830830
# - "Error:" or "Error in " prefix, the latter if the error has a call
831-
# - the call, possibly syntax highlightedm possibly trimmed (?)
831+
# - the call, possibly syntax highlighted possibly trimmed (?)
832832
# - source ref, with link to the file, potentially in a new line in cli
833833
# - error message, just `conditionMessage()`
834834
# - advice about .Last.error and/or .Last.error.trace

R/hash.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ hash_file_xxhash <- function(paths) {
568568

569569
#' @export
570570
#' @rdname hash_xxhash
571-
#' @details The `64` functions caculate the 64 bit variant
571+
#' @details The `64` functions calculate the 64 bit variant
572572
#' of xxHash. Otherwise they work the same.
573573

574574
hash_xxhash64 <- function(x) {

R/inline.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ inline_collapse <- function(x, style = list()) {
7474
#' ```
7575
#' The `before` and `after`, etc. style attributes should not be applied
7676
#' to `{n}`.
77-
#' * While making sure that the inlide style's non-interited style is
77+
#' * While making sure that the inline style's non-inherited style is
7878
#' applied to brace expressions. I.e. in
7979
#' ```r
8080
#' cli_text("{.fun {x}}")

R/utf8.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ is_utf8_output <- function() {
4646
#' utf8_nchar(emo, "width")
4747
#' utf8_nchar(emo, "codepoints")
4848
#'
49-
#' # For comparision, the output for width depends on the R version used:
49+
#' # For comparison, the output for width depends on the R version used:
5050
#' nchar(emo, "chars")
5151
#' nchar(emo, "bytes")
5252
#' nchar(emo, "width")

R/vt.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
#' - Unicode graphemes.
2222
#'
2323
#' @param output Character vector or raw vector. Character vectors are
24-
#' collapsed (without a separater), and converted to a raw vector using
24+
#' collapsed (without a separator), and converted to a raw vector using
2525
#' [base::charToRaw()].
2626
#' @param width Terminal width.
2727
#' @param height Terminal height.
2828
#' @return Data frame with columns `lineno`, `segmentno`, `segment`,
2929
#' `attributes`.
3030
#'
3131
#' @note
32-
#' This function is experimental, and the virtual temrinal API will
32+
#' This function is experimental, and the virtual terminal API will
3333
#' likely change in future versions of cli.
3434
#'
3535
#' @export

R/width.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#' console_width()
3232

3333
console_width <- function() {
34-
# cli.width option always takes priotity
34+
# cli.width option always takes priority
3535
cwopt <- getOption("cli.width")
3636
if (!is.null(cwopt)) {
3737
if (!is.numeric(cwopt) || length(cwopt) != 1) {

0 commit comments

Comments
 (0)