Skip to content

Commit

Permalink
docs: handle [x/y.Z] comment links (was [x.Z] only before)
Browse files Browse the repository at this point in the history
Signed-off-by: Maxime Soulé <btik-git@scoubidou.com>
  • Loading branch information
maxatome committed Mar 18, 2023
1 parent f759dae commit 692025c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/gen_funcs.pl
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,12 @@
if ($pkg =~ /^\s*(\w+)\s+\"([^"]+)/)
{
$imports{$1} = $2;
$imports{$2} = $2;
}
elsif ($pkg =~ m,^\s*"((?:.+/)?([^/"]+)),)
{
$imports{$2} = $1;
$imports{$1} = $1;
}
else
{
Expand Down Expand Up @@ -1095,7 +1097,7 @@ sub process_doc
qq![`$inner`]($URL_GODOC/td#$1)!;
}
# imported package
elsif ($inner =~ /^\*?([a-z]\w*)(?:\.([A-Z]\w*(?:\.[A-Z]\w*)?))?\z/
elsif ($inner =~ m,^\*?([a-z][\w/]*)(?:\.([A-Z]\w*(?:\.[A-Z]\w*)?))?\z,
and my $full = $op->{imports}{$1})
{
qq![`$inner`]($URL_GODEV/$full! . ($2 ? "#$2" : '') . ')';
Expand Down

0 comments on commit 692025c

Please sign in to comment.