This is a convenience function for testing and development.

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())