Skip to content

Commit

Permalink
R CMD check warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
brodieG committed Dec 25, 2021
1 parent 67ca226 commit 139f704
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 18 deletions.
1 change: 1 addition & 0 deletions R/sgr.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ strip_ctl <- function(x, ctl='all', warn=getOption('fansi.warn', TRUE), strip) {
#' @export
#' @examples
#' ## convenience function, same as `strip_ctl(ctl=c('sgr', 'url'))`
#' string <- "hello\033k\033[45p world\n\033[31mgoodbye\a moon"
#' strip_sgr(string)

strip_sgr <- function(x, warn=getOption('fansi.warn', TRUE)) {
Expand Down
17 changes: 9 additions & 8 deletions R/substr2.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@
#'
#' A number of _Normal_ characters such as combining diacritic marks have
#' reported width of zero. These are typically displayed overlaid on top of the
#' preceding glyph, as in the case of `"e\u301"` forming `"é"`. Unlike _Control
#' Sequences_, which also have reported width of zero, `fansi` groups zero-width
#' _Normal_ characters with the last preceding non-zero width _Normal_
#' character. This is incorrect for some rare zero-width _Normal_ characters
#' such as prepending marks (see "Output Stability" and "Graphemes").
#' preceding glyph, as in the case of `"e\u301"` forming "e" with an acute
#' accent. Unlike _Control Sequences_, which also have reported width of zero,
#' `fansi` groups zero-width _Normal_ characters with the last preceding
#' non-zero width _Normal_ character. This is incorrect for some rare
#' zero-width _Normal_ characters such as prepending marks (see "Output
#' Stability" and "Graphemes").
#'
#' @section Output Stability:
#'
Expand Down Expand Up @@ -232,11 +233,11 @@
#' substr_ctl("\033[42mhello\033[m world", 1, 9)
#' substr_ctl("\033[42mhello\033[m world", 3, 9)
#'
#' ## Positions 2 and 4 are in the middle of the full width for
#' ## Positions 2 and 4 are in the middle of the full width W (\uFF37) for
#' ## the `start` and `stop` positions respectively. Use `round`
#' ## to control result:
#' ## 12345
#' x <- "WnW"
#' x <- "\uFF37n\uFF37"
#' x
#' substr2_ctl(x, 2, 4, type='width', round='start')
#' substr2_ctl(x, 2, 4, type='width', round='stop')
#' substr2_ctl(x, 2, 4, type='width', round='neither')
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ master branch typically mirrors CRAN and should be stable.
* R Core for developing and maintaining such a wonderful language.
* CRAN maintainers, for patiently shepherding packages onto CRAN and maintaining
the repository, and Uwe Ligges in particular for maintaining
[Winbuilder](http://win-builder.r-project.org/).
[Winbuilder](https://win-builder.r-project.org/).
* [Gábor Csárdi](https://github.com/gaborcsardi) for getting me started on the
journey ANSI control sequences, and for many of the ideas on how to process
them.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Acknowledgments
- R Core for developing and maintaining such a wonderful language.
- CRAN maintainers, for patiently shepherding packages onto CRAN and
maintaining the repository, and Uwe Ligges in particular for
maintaining [Winbuilder](http://win-builder.r-project.org/).
maintaining [Winbuilder](https://win-builder.r-project.org/).
- [Gábor Csárdi](https://github.com/gaborcsardi) for getting me
started on the journey ANSI control sequences, and for many of the
ideas on how to process them.
Expand Down
1 change: 1 addition & 0 deletions man/strip_sgr.Rd

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

17 changes: 9 additions & 8 deletions man/substr_ctl.Rd

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

0 comments on commit 139f704

Please sign in to comment.