Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Encoding: UTF-8
Package: ppcli
Type: Package
Title: Plaintext Board Game Visualizations
Version: 0.3.0-2
Version: 0.3.0-3
Authors@R: c(person("Trevor L.", "Davis", role=c("aut", "cre"),
email="trevor.l.davis@gmail.com",
comment = c(ORCID = "0000-0001-6341-4639")))
Expand Down
5 changes: 4 additions & 1 deletion R/str_piece.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#' If `FALSE` won't colorize output at all.
#' If `"html"` will colorize output for html.
#' Otherwise will colorize output for the terminal using ANSI CSI SGR control sequences.
#' See [cli::ansi_palettes] to customize the colors used.
#' @param reorient Determines whether and how we should reorient (the angle) of pieces or symbols:\enumerate{
#' \item{The default "none" (or `FALSE`) means don't reorient any pieces/symbols.}
#' \item{"all" (or `TRUE`) means setting the angle to zero for all pieces
Expand Down Expand Up @@ -129,9 +130,11 @@ str_piece_helper <- function(
text <- rev(apply(cm$char, 1, function(x) paste(x, collapse = "")))
text <- paste(text, collapse = "\n")
if (color == "html") {
# cli::ansi_html() drops background colors from subsequent spans when
# only the foreground changes; ansi_simplify() does not help
# see https://github.com/r-lib/cli/issues/752
assert_suggested("fansi")
text <- fansi::sgr_to_html(text)
# text <- cli::ansi_html(text)
}
paste0(text, "\n")
}
Expand Down
3 changes: 2 additions & 1 deletion man/cat_piece.Rd

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

3 changes: 2 additions & 1 deletion man/str_piece.Rd

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

Loading