Skip to content

Commit 4ded54e

Browse files
committed
try to parse the description help information from the comment docs
1 parent cbfed3e commit 4ded54e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

R/application/reflection.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ const __build_app = function(f) {
1515
let context_env = attrs$context_env;
1616
let workfiles = attrs$workfiles;
1717

18+
if (str_empty(desc, test_empty_factor=TRUE)) {
19+
# get description text from the function comment docs
20+
let json_str = attr(f, which = "r-sharp-help");
21+
22+
if (!is.null(json_str)) {
23+
json_str = JSON::json_decode(json_str);
24+
json_str = (json_str$description) || (json_str$title);
25+
26+
desc <- json_str;
27+
}
28+
}
29+
1830
if (nchar(app_name) == 0) {
1931
echo_warning([
2032
"invalid application function configuration was found:",

0 commit comments

Comments
 (0)