diffobj (version 0.1.2)

StyleFuns-class: Functions Used for Styling Diff Components

Description

Except for container every function specified here should be vectorized and apply formatting to each element in a character vectors. The functions must accept at least one argument and require no more than one argument. The text to be formatted will be passed as a character vector as the first argument to each function.

Arguments

container
function used primarily by HTML styles to generate an outermost DIV that allows for CSS targeting of its contents (see cont_f for a function generator appropriate for use here)
line
function
line.insert
function
line.delete
function
line.match
function
line.guide
function formats guide lines (see guides)
text
function
text.insert
function
text.delete
function
text.match
function
text.guide
function formats guide lines (see guides)
gutter
function
gutter.insert
function
gutter.delete
function
gutter.match
function
gutter.guide
function
gutter.pad
function
header
function to format each hunk header with
banner
function to format entire banner
banner.insert
function to format insertion banner
banner.delete
function to format deletion banner
meta
function format meta information lines
context.sep
function to format the separator used to visually distinguish the A and B hunks in “context” mode

Value

a StyleFuns S4 object

Details

These functions are applied in post processing steps. The diff* methods do not do any of the formatting. Instead, the formatting is done only if the user requests to show the object. Internally, show first converts the object to a character vector using as.character, which applies every formatting function defined here except for container. Then show applies container before forwarding the result to the screen or pager.

See Also

Style