Comment title to chunk code

comment_title(
  options = list(engine = "R"),
  template = "{engine}",
  extra_syntax = character(0L),
  ...
)

Arguments

options

A list of chunk options.

template

A template of title processed by glue::glue(). The processed value is automatically commented out by comment_out().

extra_syntax

A named character vector which defines extra syntax to comment out. Each values should contain %s which is the placeholder to insert x. If definitions collides among comment_syntax and extra_syntax, then the latter has priority.

...

Arguments passed to glue::glue()

See also

Examples

comment_title( options = list(engine = "R"), template = "{engine}" )
#> [1] "# R"
comment_title( options = list(engine = "css", label = "mystyle"), template = "{label}.{engine}" )
#> [1] "/* mystyle.css */"