Skip to content

Commit d63de29

Browse files
committed
fix when there are no control chunks
1 parent 405c214 commit d63de29

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

inst/shiny/modules/rep_markdown.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ rep_markdown_module_server <- function(id, common, parent_session, map, COMPONEN
8585
for (i in seq_along(chunk_control_lines)) {
8686
chunks_to_remove[i] <- min(chunk_starts[chunk_starts > chunk_control_lines[i]])
8787
}
88-
combined_rmd <- combined_rmd[-chunks_to_remove]
88+
if (any(!is.na(chunks_to_remove))){
89+
combined_rmd <- combined_rmd[-chunks_to_remove]
90+
}
8991
combined_rmd <- gsub("\\{r,", "```{r,", combined_rmd)
9092
}
9193

0 commit comments

Comments
 (0)