span_utils: Span detection and extraction utilities

span_utilsR Documentation

Span detection and extraction utilities

Description

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


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