Skip to content

Commit 25b0e28

Browse files
close connection after it was used
1 parent 4788f2e commit 25b0e28

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

R/roxygen-examples-parse.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515
#' ))
1616
#' @keywords internal
1717
parse_roxygen <- function(roxygen) {
18-
parsed <- remove_roxygen_mask(roxygen) %>%
19-
textConnection() %>%
18+
connection <- remove_roxygen_mask(roxygen) %>%
19+
textConnection()
20+
parsed <- connection %>%
2021
tools::parse_Rd(fragment = TRUE) %>%
2122
as.character()
2223
is_line_break <- parsed[1] == "\n"
24+
close(connection)
2325
c(parsed[1][!is_line_break], parsed[-1])
2426
}
2527

0 commit comments

Comments
 (0)