The documentation of
stringr::str_view() specifies that it is possible to set
string.html = TRUE as global option to avoid specifying the
html = TRUE option - which generates a html output instead of the ANSI output standard since
stringr 1.5.0 - in every call to
However, it simply does not work for me.
library(stringr) options(stringr.html = TRUE) c("a cat", "that dog", "a similar cat", "the penguin") |> str_view("cat")
Whereas specifying the option in a single call does work, with the html in the Viewer (and in markdown output, if working in a markdown document):
c("a cat", "that dog", "a similar cat", "the penguin") |> str_view("cat", html = TRUE)
I am working on posit Cloud (R version 4.3.1 and RStudio Pro 2023.09.1, Build 494.pro2), stringr 1.5.0.
Thanks if anybody has any idea of what I am doing wrong!