File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -483,7 +483,10 @@ extract_keyed_comment_blocks__ <- function(
483483 grepl(detect_allowed_keys_regex , x )
484484 }
485485 }
486- is_allowed_key <- detect_allowed_keys(block_df [[" key" ]])
486+
487+ dbc :: assert_prod_interim_is_logical_nonNA_vector(
488+ is_allowed_key <- detect_allowed_keys(block_df [[" key" ]])
489+ )
487490 if (insert ) {
488491 # @codedoc_comment_block codedoc:::extract_keyed_comment_blocks__
489492 # @details
Original file line number Diff line number Diff line change @@ -71,17 +71,26 @@ pkg_doc_codedoc_df__ <- function(
7171 )
7272 }
7373 .__PKG_DOC_ENV__. [[" text_file_df" ]] <- new_text_file_df
74- pkg_nm <- read.dcf(
75- " DESCRIPTION" ,
76- fields = " Package"
77- )[1L , 1L ]
7874 extract_arg_list <- as.list(extract_arg_list )
7975 extract_arg_list [[" detect_allowed_keys" ]] <- function (x ) {
80- grepl(pkg_nm , x )
76+ pkg_nm <- read.dcf(
77+ " DESCRIPTION" ,
78+ fields = " Package"
79+ )[1L , 1L ]
80+ re_set <- sprintf(
81+ c(" ^%s" , " ^news[(]\" %s" , " ^return[(]%s::" ),
82+ pkg_nm
83+ )
84+ out <- rep(FALSE , length(x ))
85+ for (re in re_set ) {
86+ out <- out | grepl(re , x )
87+ }
88+ return (out )
8189 }
8290 extract_arg_list [[" text_file_paths" ]] <- text_file_paths
8391 .__PKG_DOC_ENV__. [[" codedoc_df" ]] <-
84- do.call(codedoc :: extract_keyed_comment_blocks , extract_arg_list )
92+ do.call(codedoc :: extract_keyed_comment_blocks , extract_arg_list ,
93+ quote = TRUE )
8594 }
8695 return (.__PKG_DOC_ENV__. [[" codedoc_df" ]])
8796}
@@ -159,8 +168,7 @@ pkg_doc_fun <- function(
159168 # ' otherwise.
160169 df <- pkg_doc_codedoc_df__(
161170 dir_path = getwd(),
162- text_file_paths = text_file_paths ,
163- extract_arg_list = list (detect_allowed_keys = regex )
171+ text_file_paths = text_file_paths
164172 )
165173 # @codedoc_comment_block codedoc::pkg_doc_fun
166174 # - Collect comment block lines whose keys match one of:
You can’t perform that action at this time.
0 commit comments