hi_andre: A wrapper to Andre Simon's Highlight

View source: R/highlight.R

hi_andreR Documentation

A wrapper to Andre Simon's Highlight

Description

This function calls Highlight to syntax highlight a code fragment.

Usage

hi_andre(code, language, format = "html")

Arguments

code

a character string of the source code

language

the input language (c, cpp, python, r, ...); see system('highlight -p')

format

the output format (html, latex, ...)

Value

A character string for the syntax highlighted code.

References

Andre Simon's Highlight package https://gitlab.com/saalen/highlight.

Examples

## Not run: 
hi_andre("1+1", language = "R")
hi_andre("void main() {\nreturn(0)\n}", language = "c", format = "latex")

## End(Not run)

highr documentation built on June 22, 2024, 12:02 p.m.

Related to hi_andre in highr...