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.
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.
Note
the slots are set to class “ANY” to allow classed functions
such as those defined in the crayon package. Despite this seemingly
permissive slot definition, only functions are allowed in the slots by
the validation functions.
Constructor Arguments
containerfunction used primarily by HTML styles to generate an outermost
DIVthat allows for CSS targeting of its contents (seecont_ffor a function generator appropriate for use here)linefunction
line.insertfunction
line.deletefunction
line.matchfunction
line.guidefunction formats guide lines (see
guides)textfunction
text.insertfunction
text.deletefunction
text.matchfunction
text.guidefunction formats guide lines (see
guides)gutterfunction
gutter.insertfunction
gutter.deletefunction
gutter.matchfunction
gutter.guidefunction
gutter.padfunction
headerfunction to format each hunk header with
bannerfunction to format entire banner
banner.insertfunction to format insertion banner
banner.deletefunction to format deletion banner
metafunction format meta information lines
context.sepfunction to format the separator used to visually distinguish the A and B hunks in “context”
mode