stringr
stringr copied to clipboard
Break str_view() match colouring across lines
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)