as_document: Convert an 'rmd_ast', 'rmd_tibble', or any ast node into...

View source: R/as_document.R

as_documentR Documentation

Convert an rmd_ast, rmd_tibble, or any ast node into text.

Description

Convert an rmd_ast, rmd_tibble, or any ast node into text.

Usage

as_document(x, padding = "", collapse = NULL, use_yaml_opts = TRUE, ...)

Arguments

x

rmd_ast, rmd_tibble, or parsermd node object.

padding

Padding to add between nodes when assembling the text.

collapse

If not NULL, use value to collapse lines.

use_yaml_opts

Logical. Whether to use YAML format for chunk options (default TRUE).

...

Passed to to_ast() when converting rmd_collection or qmd_collection.

Value

Returns a character vector.


parsermd documentation built on Aug. 21, 2025, 5:27 p.m.