Skip to content

Commit

Permalink
Add support
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Oct 14, 2024
1 parent 61399e5 commit f811039
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions vignettes/support.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
knitr::opts_chunk$set(
error = FALSE,
collapse = TRUE,
comment = "#>",
fig.width = 7,
fig.height = 5)

lang_output <- function(x, lang) {
cat(c(sprintf("```%s", lang), x, "```"), sep = "\n")
}
cc_output <- function(x) lang_output(x, "cc")
r_output <- function(x) lang_output(x, "r")
plain_output <- function(x) lang_output(x, "plain")

0 comments on commit f811039

Please sign in to comment.