Skip to content

Commit e804ca5

Browse files
committed
use teal.reporter::code_chunk
1 parent 0a3a8d1 commit e804ca5

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

R/tm_a_regression.R

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ srv_a_regression <- function(id,
10381038
"## Plot",
10391039
plot_r(),
10401040
"## Source Code",
1041-
format_as_markdown_chunk(source_code_r()),
1041+
teal.reporter::code_chunk(source_code_r()),
10421042
"## Table for testing",
10431043
head(iris)
10441044
)
@@ -1050,7 +1050,3 @@ srv_a_regression <- function(id,
10501050
)
10511051
})
10521052
}
1053-
1054-
format_as_markdown_chunk <- function(r_code) {
1055-
sprintf("```{r}\n%s\n```", r_code)
1056-
}

0 commit comments

Comments
 (0)