[gtk-doc] fixxref: less false reports for new xref warnings
- From: Stefan Kost <stefkost src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk-doc] fixxref: less false reports for new xref warnings
- Date: Wed, 25 Nov 2009 15:04:13 +0000 (UTC)
commit a47d0c50bb4d2b3c73a92d2571753cc1367c470f
Author: Stefan Kost <ensonic users sf net>
Date: Wed Nov 25 17:04:12 2009 +0200
fixxref: less false reports for new xref warnings
Auto blacklist the implcitely created xrefs in source code examples.
gtkdoc-fixxref.in | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gtkdoc-fixxref.in b/gtkdoc-fixxref.in
index da38a7b..3263110 100755
--- a/gtkdoc-fixxref.in
+++ b/gtkdoc-fixxref.in
@@ -269,7 +269,7 @@ sub FixHTMLFile {
my @lines = split(/\n/, $entire_file);
for (my $i=0; $i<$#lines; $i++) {
- $lines[$i] =~ s%<GTKDOCLINK\s+HREF="([^"]*)"\s*>(.*?)</GTKDOCLINK\s*>% &MakeXRef($file,$i,$1,$2); %ge;
+ $lines[$i] =~ s%<GTKDOCLINK\s+HREF="([^"]*)"\s*>(.*?)</GTKDOCLINK\s*>% &MakeXRef($file,$i+1,$1,$2); %ge;
}
$entire_file = join("\n",@lines);
@@ -317,9 +317,13 @@ sub MakeXRef {
sub MakeGtkDocLink {
my ($pre,$symbol,$post) = @_;
-
+
my $id=CreateValidSGMLID($symbol);
-
+
+ # these are implicitely created links in highlighed sources
+ # we don't want warnings for those if the links cannot be resolved.
+ $NoLinks{$id} = 1;
+
#return "<span class=\"$type\"><GTKDOCLINK HREF=\"$id\">$symbol</GTKDOCLINK></span>";
return "$pre<GTKDOCLINK HREF=\"$id\">$symbol</GTKDOCLINK>$post";
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]