ansi_aware_handler | R Documentation |
Helper function for printing ANSI in Rmarkdown output. Use this at the start of your Rmarkdown files to include colors in the printed object names in the final compiled output.
ansi_aware_handler(x, options)
x |
A character vector potentially including ANSI. |
options |
Unused placeholder argument. |
Taken from the post at
https://blog.djnavarro.net/posts/2021-04-18_pretty-little-clis/
A string with HTML reformatted to ensure colors appear in printed code blocks in rmarkdown output.
knitr::knit_hooks$set(output = ansi_aware_handler)
options(crayon.enabled = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.