Skip to content

Commit 23f2d8e

Browse files
explain and refined output so list structure of identify_start* is clear, typos.
1 parent 2b23844 commit 23f2d8e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

R/style-roxgen-examples.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ identify_start_and_stop_of_royxgen_examples_from_text <- function(text) {
99
stops <- map_int(starts, match_stop_to_start,
1010
stop_candidates = stop_candidates
1111
)
12-
NULL
12+
map2(starts, stops, c)
1313
}
1414

1515
identify_start_stop_of_royxgen_examples_from_paths <- function(path) {
1616
content <- enc::read_lines_enc(path) # ensure file can be read
1717
identify_start_stop_of_royxgen_examples_from_text(content)
18+
19+
# some random output for now to make testing work.
1820
list(
1921
c(5, 9),
2022
c(18, 39)
@@ -45,7 +47,7 @@ style_roxygen_code_examples_one <- function(path) {
4547
full_file_content, start_stop_sequences
4648
)
4749

48-
plain_examples <- map(start_stop_paris, remove_roxygen_mask,
50+
plain_examples <- map(start_stop_sequences, remove_roxygen_mask,
4951
text = masked_examples
5052
)
5153
styled_examples <- map(plain_examples, style_text, ...)

0 commit comments

Comments
 (0)