Skip to content

cran/highlighter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • Using remotes
remotes::install_github("federiva/highlighter")
  • Using renv
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")

About

❗ This is a read-only mirror of the CRAN R package repository. highlighter — Code Syntax Highlighting using the 'Prism.js' Library. Homepage: https://federiva.github.io/highlighter/

Resources

License

Stars

Watchers

Forks

Packages

No packages published