summaryrefslogtreecommitdiff
path: root/gtkdoc-fixxref.in
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2009-11-27 18:08:52 +0200
committerStefan Kost <ensonic@users.sf.net>2009-11-27 18:08:52 +0200
commite112f156832259730b6740303304d03ec3d2c43c (patch)
tree2965541b28f053451e6a2dc95a9918d780a56c44 /gtkdoc-fixxref.in
parentd5d86fbbde9c551074c7d8833193a8e8bb8b46a5 (diff)
downloadgtk-doc-e112f156832259730b6740303304d03ec3d2c43c.tar.gz
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.
Diffstat (limited to 'gtkdoc-fixxref.in')
-rwxr-xr-xgtkdoc-fixxref.in7
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
+ # &lt;GTKDOCLINK HREF=&quot;GST-PAD-SINK:CAPS&quot;&gt;GST_PAD_SINK&lt;/GTKDOCLINK&gt;
+ $entire_file =~ s%\&lt;GTKDOCLINK\s+HREF=\&quot;(.*?)\&quot;\&gt;(.*?)\&lt;/GTKDOCLINK\&gt;%\<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);