# NOT RUN {
rmarkdown::render(
    redoc_example_rmd(),
    output_format = redoc(
                      wrappers = list(
                        htmlcommentwrap,
                        latexwrap)))
# This is how each of these functions are defined in the redoc package
htmlcommentwrap <- make_wrapper(
    label = "htmlcomment",
    regex = "(?s)<!--.*?-->",
    type = "inline")
latexwrap <- make_wrapper(
    label = "latex",
    regex = "(?<=[\n\r])\\\\\\w+.*?(?=[\n\r])",
    type = "block")
rawblockwrap <- make_wrapper(
    label = "rawblock",
    regex = "(?s)```\\{=\\w+\\}.*?```\\h*",
    type = "block")
rawspanwrap <- make_wrapper(
    label = "rawspan",
    regex = "(?s)`[^`]`\\{=\\w+?\\}",
    type = "inline")
citationwrap <- make_wrapper(
    label = "citation",
    regex = "(?:@\\w+|\\[.*?-?@\\w+.*?\\](?!\\[\\(\\{))",
    type = "inline")
# }
Run the code above in your browser using DataLab