Package: parsermd 0.2.0.9000

parsermd: Formal Parser and Related Tools for R Markdown Documents

An implementation of a formal grammar and parser for R Markdown documents using the Boost Spirit X3 library. It also includes a collection of high level functions for working with the resulting abstract syntax tree.

Authors:Colin Rundel [aut, cre]

parsermd_0.2.0.9000.tar.gz
parsermd_0.2.0.9000.zip(r-4.7)parsermd_0.2.0.9000.zip(r-4.6)parsermd_0.2.0.9000.zip(r-4.5)
parsermd_0.2.0.9000.tgz(r-4.6-x86_64)parsermd_0.2.0.9000.tgz(r-4.6-arm64)parsermd_0.2.0.9000.tgz(r-4.5-x86_64)parsermd_0.2.0.9000.tgz(r-4.5-arm64)
parsermd_0.2.0.9000.tar.gz(r-4.7-arm64)parsermd_0.2.0.9000.tar.gz(r-4.7-x86_64)parsermd_0.2.0.9000.tar.gz(r-4.6-arm64)parsermd_0.2.0.9000.tar.gz(r-4.6-x86_64)
parsermd_0.2.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
parsermd/json (API)

# Install 'parsermd' in R:
install.packages('parsermd', repos = c('https://rundel.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/rundel/parsermd/issues

Pkgdown/docs site:https://rundel.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

quartocpp

9.43 score 92 stars 2 packages 79 scripts 1.7k downloads 66 exports 61 dependencies

Last updated from:23583a55fc. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK212
linux-devel-x86_64OK199
source / vignettesOK240
linux-release-arm64OK215
linux-release-x86_64OK191
macos-release-arm64OK152
macos-release-x86_64OK515
macos-oldrel-arm64OK193
macos-oldrel-x86_64OK259
windows-develOK196
windows-releaseOK197
windows-oldrelOK214
wasm-releaseOK193

Exports:%>%as_astas_documentas_tibbleby_fenced_divby_sectionhas_codehas_headinghas_inline_codehas_labelhas_optionhas_shortcodehas_typeparse_qmdparse_qmd_collectionparse_rmdparse_rmd_collectionrenderrmd_astrmd_ast_appendrmd_ast_prependrmd_check_templatermd_chunkrmd_code_blockrmd_code_block_literalrmd_extract_inline_codermd_extract_shortcodesrmd_extract_spansrmd_fenced_div_closermd_fenced_div_openrmd_fenced_div_wraprmd_get_optionsrmd_has_inline_codermd_has_shortcodermd_has_spanrmd_headingrmd_inline_codermd_insertrmd_markdownrmd_modifyrmd_node_attrrmd_node_attr<-rmd_node_codermd_node_contentrmd_node_content<-rmd_node_depthrmd_node_enginermd_node_labelrmd_node_label<-rmd_node_lengthrmd_node_optionsrmd_node_options<-rmd_node_sectionsrmd_node_set_attrrmd_node_set_contentrmd_node_set_labelrmd_node_set_optionsrmd_node_typermd_raw_chunkrmd_selectrmd_set_optionsrmd_shortcodermd_sourcermd_spanrmd_templatermd_yaml

Dependencies:backportsbase64encBHbitbit64bslibcachemcheckmateclicliprcpp11crayondigestdplyrevaluatefastmapfontawesomefsgenericsgluehighrhmshtmltoolsjquerylibjsonliteknitrlaterlifecyclemagrittrmemoisemimepillarpkgconfigprettyunitsprocessxprogresspspurrrquartoR6rappdirsRcppreadrrlangrmarkdownrstudioapiS7sassstringistringrtibbletidyrtidyselecttinytextzdbutf8vctrsvroomwithrxfunyaml

Know your nodes
Introduction | AST Container - rmd_ast | S7 Class System | Core Node Types | Document Structure Nodes | YAML Header - rmd_yaml | Markdown Headings - rmd_heading | Markdown Text - rmd_markdown | Code and Execution Nodes | Executable Code Chunks - rmd_chunk | Raw Output Chunks - rmd_raw_chunk | Fenced Code Blocks - rmd_code_block | Code Block Literals - rmd_code_block_literal | Structural Elements | Fenced Divs - rmd_fenced_div_open & rmd_fenced_div_close | Extracted Elements | Inline Code - rmd_inline_code | Shortcode Function Calls - rmd_shortcode | Spans - rmd_span | Extraction Functions

Last update: 2025-08-19
Started: 2025-08-08

Modifying Rmd and Quarto Documents
Introduction | Modifying Nodes with rmd_modify() | Example: Changing Chunk Options | Example: Modifying Text Content | Inserting Nodes with rmd_insert() | Example: Adding a Setup Chunk | Working with Structural Elements | Wrapping Nodes in Fenced Divs | Selecting Content Inside Fenced Divs | Working with Shortcodes | Extracting Shortcodes | Modifying Shortcodes

Last update: 2025-08-19
Started: 2025-08-19

Example - Assignment with Key
Introduction | Sample Assignment Structure | Parsing the Document | Creating the Student Version | Creating the Instructor Key | Creating a Minimalist Key | Best Practices

Last update: 2025-08-10
Started: 2025-08-10

Getting Started
parsermd | Installation | Parsing Rmds | Working with the AST | Wildcards

Last update: 2025-08-10
Started: 2025-08-08

Rmd Templates
Example - hw01 | Constructing a template | Using a template | Revising a template

Last update: 2025-08-10
Started: 2025-08-08

Readme and manuals

Help Manual

Help pageTopics
Convert an object into an 'rmd_ast'.as_ast
Convert an 'rmd_ast', 'rmd_tibble', or any ast node into text.as_document
Get and set code chunk optionschunk_options rmd_get_options rmd_set_options
Inline code detection and extraction utilitiesinline_code_utils rmd_extract_inline_code rmd_has_inline_code
Parse a collection of R Markdown or Quarto documentparse_collection parse_qmd_collection parse_rmd_collection
Parse an R Markdown or Quarto documentparse_qmd parse_rmd
Render 'parsermd' objectsrender
Append or preprend nodes to an astrmd_ast_append rmd_ast_prepend
Check an Rmd against a templatermd_check_template
Code chunk nodermd_chunk
S7 Class Definitions for RMD Nodesrmd_ast rmd_classes_s7 rmd_node rmd_yaml
Markdown code block nodermd_code_block
Code block literal nodermd_code_block_literal
Closing fenced div nodermd_fenced_div_close
Opening fenced div nodermd_fenced_div_open
Wrap selected nodes with fenced divsrmd_fenced_div_wrap
Heading nodermd_heading
Inline code nodermd_inline_code
Insert nodes at specified locationsrmd_insert
Markdown text nodermd_markdown
Modify nodes of an Rmd astrmd_modify
Calculate nesting depth for each node in an R Markdown ASTrmd_node_depth
Find the sections for each rmd object nodermd_node_sections
rmd node utility functionsrmd_node_attr rmd_node_attr<- rmd_node_attr<-.default rmd_node_attr<-.rmd_node rmd_node_code rmd_node_content rmd_node_content<- rmd_node_content<-.default rmd_node_content<-.rmd_chunk rmd_node_content<-.rmd_code_block rmd_node_content<-.rmd_code_block_literal rmd_node_content<-.rmd_markdown rmd_node_content<-.rmd_raw_chunk rmd_node_engine rmd_node_label rmd_node_label<- rmd_node_label<-.default rmd_node_label<-.rmd_chunk rmd_node_length rmd_node_options rmd_node_options<- rmd_node_options<-.default rmd_node_options<-.rmd_chunk rmd_node_set_attr rmd_node_set_content rmd_node_set_label rmd_node_set_options rmd_node_type rmd_node_utilities
Raw chunk nodermd_raw_chunk
Select nodes of an Rmd astrmd_select
Rmd selection helper functionsby_fenced_div by_section has_code has_heading has_inline_code has_label has_option has_shortcode has_type rmd_select_helpers
Shortcode nodermd_shortcode
Source the code chunks of an Rmd documentrmd_source
Span nodermd_span
Create a template from an 'rmd' object.rmd_template
Shortcode detection and extraction utilitiesrmd_extract_shortcodes rmd_has_shortcode shortcode_utils
Span detection and extraction utilitiesrmd_extract_spans rmd_has_span span_utils