ansi_aware_handler: Pretty Printing

View source: R/print.R

ansi_aware_handlerR Documentation

Pretty Printing

Description

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.

Usage

ansi_aware_handler(x, options)

Arguments

x

A character vector potentially including ANSI.

options

Unused placeholder argument.

Details

Taken from the post at

https://blog.djnavarro.net/posts/2021-04-18_pretty-little-clis/

Value

A string with HTML reformatted to ensure colors appear in printed code blocks in rmarkdown output.

Examples

knitr::knit_hooks$set(output = ansi_aware_handler)
options(crayon.enabled = TRUE)

multimedia documentation built on Sept. 30, 2024, 9:28 a.m.