浏览代码

wikiheaders.pl: Fix \sa tags that (incorrectly!) have "()" appended.

Ryan C. Gordon 4 年之前
父节点
当前提交
7390bc0e5e
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      build-scripts/wikiheaders.pl

+ 2 - 0
build-scripts/wikiheaders.pl

@@ -611,6 +611,7 @@ if ($copy_direction == 1) {  # --copy-to-headers
             my @desclines = split /\n/, $v;
             foreach (@desclines) {
                 s/\A(\:|\* )//;
+                s/\(\)\Z//;  # Convert "SDL_Func()" to "SDL_Func"
                 $str .= "\\sa $_\n";
             }
         }
@@ -764,6 +765,7 @@ if ($copy_direction == 1) {  # --copy-to-headers
                 $sections{'Version'} = wordwrap($desc) . "\n";
             } elsif ($l =~ /\A\\sa\s+(.*)\Z/) {
                 my $sa = $1;
+                $sa =~ s/\(\)\Z//;  # Convert "SDL_Func()" to "SDL_Func"
                 $sections{'Related Functions'} = '' if not defined $sections{'Related Functions'};
                 if ($wikitype eq 'mediawiki') {
                     $sections{'Related Functions'} .= ":[[$sa]]\n";