engines: Language engines

enginesR Documentation

Language engines

Description

Get or set language engines for evaluating code chunks and inline code.

Usage

engines(...)

Arguments

...

Named values (for setting) or unnamed values (for getting).

Details

An engine function should have three arguments:

  • x: An element in the crack() list (a code chunk or a text block).

  • inline: It indicates if x is from a code chunk or inline code.

  • ...: Currently unused but recommended for future compatibility (more arguments might be passed to the function).

The function should return a character value.

Value

The usage is similar to reactor(): engines('LANG') returns an engine function for the language LANG, and engines(LANG = function(x, inline = FALSE, ...) {}) sets the engine for a language.

Examples

litedown::engines()  # built-in engines

litedown documentation built on Oct. 17, 2024, 1:06 a.m.