Skip to contents

Functions for detecting and extracting inline code chunks from AST nodes after the initial parsing phase.

Usage

rmd_has_inline_code(x, engine = NULL)

rmd_extract_inline_code(x, flatten = FALSE)

Arguments

x

An AST node, list of nodes, or character vector

engine

character vector, optional glob patterns for matching inline code engine names. If NULL (default), matches any inline code.

flatten

Return a flat list inline codes if TRUE

Value

  • rmd_has_inline_code(): logical vector indicating which nodes contain inline code

  • rmd_extract_inline_code(): list of inline code objects found in the content