as_paragraph_md: Convert a character vector into markdown paragraph(s)

View source: R/as-paragraph-md.R

as_paragraph_mdR Documentation

Convert a character vector into markdown paragraph(s)

Description

Parse markdown cells and returns the "paragraph" object.

Usage

as_paragraph_md(
  x,
  auto_color_link = "blue",
  md_extensions = NULL,
  pandoc_args = NULL,
  metadata = render_metadata(),
  replace_na = "",
  .from = "markdown+autolink_bare_uris-raw_html-raw_attribute",
  .footnote_options = NULL,
  ...
)

Arguments

x

A character vector.

auto_color_link

A color of the link texts.

md_extensions

Pandoc's extensions. Although it is prefixed with "md", extensions for any formats specified to .from can be used. See https://www.pandoc.org/MANUAL.html#extensions for details.

pandoc_args

Additional command line options to pass to pandoc

metadata

A list of metadata, typically the parsed result of the YAML front matter. By default, uses resolved Quarto execution metadata when QUARTO_EXECUTE_INFO is set (Quarto 1.8 or later), otherwise rmarkdown::metadata. Explicit values, including NULL or list(), override this default. Inherited bibliography, CSL, and citation-abbreviation paths are resolved relative to the Quarto source document when the file exists there; other names retain Pandoc's resource lookup. This value is used iff the .from argument specifies an input format that supports YAML metadata blocks.

replace_na

A value to replace NA (default = "").

.from

Pandoc's --from argument (default: 'markdown+autolink_bare_uris').

.footnote_options

Options for footnotes generated by footnote_options().

...

Arguments passed to internal functions.

Examples

if (rmarkdown::pandoc_available("2.0.6")) {
  library(flextable)
  ft <- flextable(
    data.frame(
      x = c("**foo** bar", "***baz***", "*qux*"),
      stringsAsFactors = FALSE
    )
  )
  ft <- compose(ft, j = "x", i = 1:2, value = as_paragraph_md(x))
  autofit(ft)
}

ftExtra documentation built on Sept. 16, 2026, 9:08 a.m.