[gtk-doc] fixxref: don't leak GTKDOCLINKs to final html
- From: Stefan Kost <stefkost src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk-doc] fixxref: don't leak GTKDOCLINKs to final html
- Date: Fri, 27 Nov 2009 16:13:44 +0000 (UTC)
commit e112f156832259730b6740303304d03ec3d2c43c
Author: Stefan Kost <ensonic users sf net>
Date: Fri Nov 27 18:08:52 2009 +0200
fixxref: don't leak GTKDOCLINKs to final html
If someone uses markup in sources, we expand the links and then escape the
markup. We have to revert the escaping for GTKDOCLINK tags.
gtkdoc-fixxref.in | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gtkdoc-fixxref.in b/gtkdoc-fixxref.in
index 09f3fae..711392b 100755
--- a/gtkdoc-fixxref.in
+++ b/gtkdoc-fixxref.in
@@ -292,6 +292,10 @@ sub FixHTMLFile {
else {
$entire_file =~ s%<div class=\"(example-contents|informalexample)\"><pre class=\"programlisting\">(.*?)</pre></div>%&HighlightSource($1,$2);%gse;
}
+ # this just broke existing GTKDOCLINK tags
+ # <GTKDOCLINK HREF="GST-PAD-SINK:CAPS">GST_PAD_SINK</GTKDOCLINK>
+ $entire_file =~ s%\<GTKDOCLINK\s+HREF=\"(.*?)\"\>(.*?)\</GTKDOCLINK\>%\<GTKDOCLINK\ HREF=\"$1\"\>$2\</GTKDOCLINK\>%gs;
+
# from the highlighter we get all the functions marked up
# now we could turn them into GTKDOCLINK items
$entire_file =~ s%(<span class=\"function\">)(.*?)(</span>)%&MakeGtkDocLink($1,$2,$3);%gse;
@@ -302,6 +306,9 @@ 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,$1,$2); %ge;
+ #if ($lines[$i] =~ m/GTKDOCLINK/) {
+ # print "make xref failed for line: ",$lines[$i], "\n";
+ #}
}
$entire_file = join("\n",@lines);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]