shortcode_utils: Shortcode detection and extraction utilities

shortcode_utilsR Documentation

Shortcode detection and extraction utilities

Description

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

Usage

rmd_has_shortcode(x, func_name = NULL)

rmd_extract_shortcodes(x, flatten = FALSE)

Arguments

x

An AST node, list of nodes, or character vector

func_name

character vector, optional glob patterns for matching shortcode function names. If NULL (default), matches any shortcode.

flatten

Return a flat list shortcodes if TRUE

Value

  • rmd_has_shortcode(): logical vector indicating which nodes contain shortcodes

  • rmd_extract_shortcodes(): list of shortcode objects found in the content


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