Skip to contents

Functions for detecting and extracting spans from AST nodes after the initial parsing phase.

Usage

rmd_has_span(x)

rmd_extract_spans(x, flatten = FALSE)

Arguments

x

An AST node, list of nodes, or character vector

flatten

Return a flat list of spans if TRUE

Value

  • rmd_has_span(): logical vector indicating which nodes contain spans

  • rmd_extract_spans(): list of span objects found in the content