]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Doc] Improve doxydown methods/functions index
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 10 Dec 2018 13:06:54 +0000 (13:06 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 10 Dec 2018 13:06:54 +0000 (13:06 +0000)
doc/doxydown/doxydown.pl

index d58d4a9068bb4dd9aec705097f787597a4945704..85821da4dc3d386963d2f2211059ebb5e14dd764 100755 (executable)
@@ -339,15 +339,15 @@ sub parse_function {
         if ( /^\s*\@param\s*(?:\{([^}]+)\})?\s*(\S+)\s*(.+)?\s*$/ ) {
             my $p = {
                 name => $2,
-                type => $1,
-                description => $3
+                type => $1 || "no type",
+                description => $3 || "no description"
             };
 
             push @{ $f->{'params'} }, $p;
         } elsif ( /^\s*\@return\s*(?:\{([^}]+)\})?\s*(.+)?\s*$/ ) {
             my $r = {
                 type => $1,
-                description => $2
+                description => $2 || "no description"
             };
 
             push @{ $f->{'returns'} }, $r;
@@ -379,6 +379,15 @@ sub parse_function {
         chomp $f->{'example'};
     }
 
+    if ( !$f->{'brief'} && $f->{'data'} ) {
+        $f->{'data'} =~ /^([^.]+)\.?.*/;
+
+        if ( $1 ) {
+            $f->{'brief'} = "$1.";
+            chomp $f->{'brief'};
+        }
+    }
+
     if ( $type eq "method" ) {
         push @{ $cur_module->{'methods'} }, $f;
     } elsif ( $type eq "function"  ||  $type eq "fn") {