Before any formatting takes place, the unevaluated expression is
deparsed into a string via deparseCode()
, which ensures that
shinymeta comment strings (i.e., literal strings that appear on their own line,
and begin with one or more #
characters.) are turned into comments and
superfluous \{
are removed. After deparsing, the formatCode()
function then
calls the formatter
function on the deparsed string to format (aka style) the code string.
The default formatter
, styleText()
, uses styler::style_text()
with a couple differences:
Pipe operators (%>%
) are always followed by a line break.
If the token appearing after a line-break is a comma/operator, the line-break is removed.