[gtk-doc] mkdb: do strip all tags when checking for empty docs, but don't reset tmpl docs



commit 521767f0aded5c3beb75b3c11911e0df123069cb
Author: Stefan Kost <ensonic users sf net>
Date:   Tue Oct 19 10:34:12 2010 +0300

    mkdb: do strip all tags when checking for empty docs, but don't reset tmpl docs
    
    We were resetting the tmpl-docs, but we need if for the merge. If we don't strip
    all tags we end up with more warnings.

 gtkdoc-mkdb.in |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 0d50121..d29bc6b 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -4296,19 +4296,17 @@ sub MergeSourceDocumentation {
 
 	my $have_tmpl_docs = 0;
 
-	## See if the symbol is documented in template
+	## see if the symbol is documented in template
 	my $tmpl_doc = defined ($SymbolDocs{$symbol}) ? $SymbolDocs{$symbol} : "";
 	my $check_tmpl_doc =$tmpl_doc;
-	# remove all xml-tags and whitespaces (don't kill <include href="..."> tags) 
-	$check_tmpl_doc =~ s/<\/?[a-z]+>//gi;
+	# remove all xml-tags and whitespaces 
+	$check_tmpl_doc =~ s/<.*?>//g;
 	$check_tmpl_doc =~ s/\s//g;
 	# anything left ?
 	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};
@@ -4332,7 +4330,7 @@ sub MergeSourceDocumentation {
 	    # remove leading and training whitespaces
 	    $src_doc =~ s/^\s+//;
 	    $src_doc =~ s/\s+$//;
-
+	    
 	    # Don't output warnings for overridden titles as titles are
 	    # automatically generated in the -sections.txt file, and thus they
 	    # are often overridden.
@@ -4377,7 +4375,7 @@ sub MergeSourceDocumentation {
                 $SymbolDocs{$symbol} = "$src_doc_para$tmpl_doc";
             }
 
-            # merge parameters
+	    # merge parameters
 	    if ($symbol =~ m/.*::.*/) {
 		# For signals we prefer the param names from the source docs,
 		# since the ones from the templates are likely to contain the
@@ -4473,7 +4471,6 @@ sub MergeSourceDocumentation {
 	# if this symbol is documented, check if docs are complete
 	$check_tmpl_doc = defined ($SymbolDocs{$symbol}) ? $SymbolDocs{$symbol} : "";
 	# remove all xml-tags and whitespaces
-	#$check_tmpl_doc =~ s/<\/?[a-z]+>//g;
 	$check_tmpl_doc =~ s/<.*?>//g;
 	$check_tmpl_doc =~ s/\s//g;
 	if ($check_tmpl_doc ne "") {



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