[gtk-doc] mkdb: avoid empty <para> tags in tmpl based docs



commit f3cf0205847d0c8a236bd72180457a84e5ab0343
Author: Stefan Kost <ensonic users sf net>
Date:   Sat Jun 27 21:35:38 2009 +0300

    mkdb: avoid empty <para> tags in tmpl based docs
    
    The docs in templates are appended to the ones in source docs. Templates have
    an empty para by default. Don't add that. Also uncomment a print from previous
    commit.

 gtkdoc-mkdb.in |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 9f29338..f1acca9 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -3910,7 +3910,9 @@ sub MergeSourceDocumentation {
 	if ($check_tmpl_doc ne "") {
 	    $have_tmpl_docs = 1;
             #print "## [$check_tmpl_doc]\n";
-	}
+	} else {
+            $tmpl_doc = "";
+        }
 
 	if (exists ($SourceSymbolDocs{$symbol})) {
 	    my $type = $DeclarationTypes {$symbol};
@@ -3958,7 +3960,11 @@ sub MergeSourceDocumentation {
 	    # If there is a blank line, finish the paragraph and start another.
 	    $src_doc = &ConvertBlankLines ($src_doc, $symbol);
 	    # Do not add <para> to nothing, it breaks missing docs checks.
-	    my $src_doc_para = $src_doc ? "<para>\n$src_doc</para>\n" : "";
+	    my $src_doc_para = "";
+            if ($src_doc) {
+                $src_doc_para = "<para>\n$src_doc</para>\n";
+                #print "$symbol : [$src_doc][$src_doc_para]\n";
+            }
 
             if ($symbol =~ m/$TMPL_DIR\/.+:Long_Description/) {
                 $SymbolDocs{$symbol} = "$src_doc_para$tmpl_doc";
@@ -4004,7 +4010,7 @@ sub MergeSourceDocumentation {
                         # Try to find the param in the source comment documentation.
                         my $found = 0;
                         my $k;
-                        print "  try merge param $tmpl_param_name\n";
+                        #print "  try merge param $tmpl_param_name\n";
                         for ($k = 0; $k <= $#$params; $k += $PARAM_FIELD_COUNT) {
                             my $param_name = $$params[$k];
                             my $param_desc = $$params[$k + 1];



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]