The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

highlighter

R-CMD-check CRAN status

highlighter is a package used for code syntax highlighting. This package is a wrapper for the Prism.js library implemented using htmlwidgets. ## Installation

remotes::install_github("federiva/highlighter")
renv::install("federiva/highlighter")

Usage

See the vignettes for more examples.

Using highlighter

We can use the highglighter function in order to render and highlight code. By default the function will highlight the syntax of R code.

highlighter("some_variable <- 3")

If we want we can specify the language using the language parameter.

highlighter("const someVariable = 3;", language = "js")

Using highlight_file

We can pass the path to a local file using the highlight_file function

highlight_file("<path_to_your_file>", language = "r")

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.