Skip to content

Commit 3be57ec

Browse files
redzimskiicculus
authored andcommitted
docs: fix man page return value section generation
1 parent 2dad653 commit 3be57ec

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

build-scripts/wikiheaders.pl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2972,10 +2972,12 @@ sub generate_quickref {
29722972
}
29732973

29742974
if (defined $returns) {
2975+
# Check for md link in return type: ([SDL_Renderer](SDL_Renderer) *)
2976+
# This would've prevented the next regex from working properly (it'd leave " *)")
2977+
$returns =~ s/\A\(\[.*?\]\((.*?)\)/\($1/ms;
29752978
# Chop datatype in parentheses off the front.
2976-
if(!($returns =~ s/\A\([^\[]*\[[^\]]*\]\([^\)]*\)[^\)]*\) //ms)) {
2977-
$returns =~ s/\A\([^\)]*\) //ms;
2978-
}
2979+
$returns =~ s/\A\(.*?\) //;
2980+
29792981
$returns = dewikify($wikitype, $returns);
29802982
$str .= ".SH RETURN VALUE\n";
29812983
$str .= "$returns\n";

0 commit comments

Comments
 (0)