stringr icon indicating copy to clipboard operation
stringr copied to clipboard

Break str_view() match colouring across lines

Open hadley opened this issue 2 years ago • 0 comments

x1 <- cli::col_blue("x\ny")
x2 <- paste0(cli::ansi_strsplit(x, "\n", fixed = TRUE)[[1]], collapse = "\n")
x3 <- paste0("#> ", gsub("\n", "\n#> ", x2))
cat(x3)

hadley avatar Jan 19 '22 20:01 hadley