pandoc_ast: Convert a document to Pandoc's abstract syntax tree format

View source: R/utils.R

pandoc_astR Documentation

Convert a document to Pandoc's abstract syntax tree format

Description

This is a convenience function for testing and development.

Usage

pandoc_ast(file, from = NULL, tolist = TRUE)

Arguments

file

the file to convert using pandoc.

from

the format to convert from. If NULL (default) File type will be auto-detected by extension. .Rmd files will be treated as .md.

tolist

whether to return the AST as an R list. If FALSE, will return length-1 character vector of raw JSON.

Value

A list containing the structured document

Examples

ast <- pandoc_ast(redoc_example_docx())

noamross/redoc documentation built on Aug. 7, 2022, 7:22 a.m.