commit 41d0383: [Doc] Improve doxydown methods/functions index

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Dec 27 18:28:05 UTC 2018


Author: Vsevolod Stakhov
Date: 2018-12-10 13:06:54 +0000
URL: https://github.com/rspamd/rspamd/commit/41d03831084fa8ae24c2b153244e2677cd9fde42

[Doc] Improve doxydown methods/functions index

---
 doc/doxydown/doxydown.pl | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/doc/doxydown/doxydown.pl b/doc/doxydown/doxydown.pl
index d58d4a906..85821da4d 100755
--- a/doc/doxydown/doxydown.pl
+++ b/doc/doxydown/doxydown.pl
@@ -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") {


More information about the Commits mailing list