Description Usage Arguments See Also Examples
ansi_handler
converts ANSI color codes to HTML tags;
this is the callback for knitr
, see ansi_to_html for the actual
implementation.
create_trimming_hook
Creates an output callback
function (hook) for knitr
. When registered, it gets triggered by
the output.lines
option passed in a knitr
's code snippet. See this
Stack Overflow
question for more details.
1 2 3 | ansi_handler(x, options)
create_trimming_hook(output_hook)
|
x |
Text snippet. |
options |
options. |
output_hook |
|
ansi_to_html
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
knitr::knit_hooks$set(output = ansi_handler)
knitr::knit_hooks$set(message = ansi_handler)
## End(Not run)
## Not run:
output_hook <- knit_hooks$get("output")
trimming_hook <- create_trimming_hook(output_hook)
knit_hooks$set(output = trimming_hook)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.