mono_highlight: Mono Highlight HTML

View source: R/mono_highlight.R

mono_highlightR Documentation

Mono Highlight HTML

Description

Returns text with monospaced and colour html formatting.

Usage

mono_highlight(t1, text, t3, colour = "#FF4500")

Arguments

t1

Text that will precede coloured text. Still monospaced.

text

Text that will be highlighted with colour, and monospaced.

t3

Text that will follow coloured text. Still monospaced.

colour

Colour of the highlighting. Hex code required i.e. #FF4500

Details

Returns text that is surrounded with the <tt> html flag for monospaced font, but also additional <strong> and <span style='colour:'#colour'> that will colour the text to emphasise it. Requires special characters like dashes "-" to be be double-escaped "\-" to be parsed correctly.

Examples


mono_highlight("Code\\-looking text that ", "will contain red.", "")


BradyAJohnston/mdfret documentation built on April 16, 2022, 8:32 a.m.