diff options
author | Stefan Kost <ensonic@users.sf.net> | 2009-11-27 18:08:52 +0200 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2009-11-27 18:08:52 +0200 |
commit | e112f156832259730b6740303304d03ec3d2c43c (patch) | |
tree | 2965541b28f053451e6a2dc95a9918d780a56c44 /gtkdoc-fixxref.in | |
parent | d5d86fbbde9c551074c7d8833193a8e8bb8b46a5 (diff) | |
download | gtk-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-x | 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); |