EVOLUTION-MANAGER
Edit File: ansi_html.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Convert ANSI styled text to HTML</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for ansi_html {cli}"><tr><td>ansi_html {cli}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Convert ANSI styled text to HTML</h2> <h3>Description</h3> <p>Convert ANSI styled text to HTML </p> <h3>Usage</h3> <pre> ansi_html(x, escape_reserved = TRUE, csi = c("drop", "keep")) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>Input character vector.</p> </td></tr> <tr valign="top"><td><code>escape_reserved</code></td> <td> <p>Whether to escape characters that are reserved in HTML (<code>&</code>, <code><</code> and <code>></code>).</p> </td></tr> <tr valign="top"><td><code>csi</code></td> <td> <p>What to do with non-SGR ANSI sequences, either <code>"keep"</code>, or <code>"drop"</code> them.</p> </td></tr> </table> <h3>Value</h3> <p>Character vector of HTML. </p> <h3>See Also</h3> <p>Other ANSI to HTML conversion: <code><a href="ansi_html_style.html">ansi_html_style</a>()</code> </p> <h3>Examples</h3> <pre> ## Syntax highlight the source code of an R function with ANSI tags, ## and export it to a HTML file. code <- withr::with_options( list(ansi.num_colors = 256), code_highlight(format(ansi_html)) ) hcode <- paste(ansi_html(code), collapse = "\n") css <- paste(format(ansi_html_style()), collapse= "\n") page <- htmltools::tagList( htmltools::tags$head(htmltools::tags$style(css)), htmltools::tags$pre(htmltools::HTML(hcode)) ) if (interactive()) htmltools::html_print(page) </pre> <hr /><div style="text-align: center;">[Package <em>cli</em> version 3.4.1 <a href="00Index.html">Index</a>]</div> </body></html>