Skip to content

Commit 5700525

Browse files
authored
libgis: G__usage_markdown() include tool label in metadata if defined (#5677)
md metadata: include tool label in description (some of tools have only label defined, eg. r.relief)
1 parent 83a850b commit 5700525

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/gis/parser_md.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,14 @@ void G__usage_markdown(void)
3232
/* print metadata used by man/build*.py */
3333
fprintf(stdout, "---\n");
3434
fprintf(stdout, "name: %s\n", st->pgm_name);
35-
fprintf(stdout, "description: %s\n", st->module_info.description);
35+
fprintf(stdout, "description: ");
36+
if (st->module_info.label)
37+
fprintf(stdout, "%s", st->module_info.label);
38+
if (st->module_info.label && st->module_info.description)
39+
fprintf(stdout, " ");
40+
if (st->module_info.description)
41+
fprintf(stdout, "%s", st->module_info.description);
42+
fprintf(stdout, "\n");
3643
fprintf(stdout, "keywords: [ ");
3744
G__print_keywords(stdout, NULL, FALSE);
3845
fprintf(stdout, " ]");

0 commit comments

Comments
 (0)