GNOME Bugzilla – Bug 530758
gtk-doc should not expand XML tags and their attributes
Last modified: 2008-05-05 10:56:43 UTC
The following is breaking pango's doc build: <ulink url="http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries"> because gtk-doc is expanding "#Grapheme_Cluster_Boundaries" to link to it. I tried: <ulink url="http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries"> but that didn't help as it still has a hash sign in it... Any ideas how to work around for now?
I found the problematic code. Unfortunately a CDATA section can't be used to work around. I've added a tets case to svn and update this ticket when I have a workaround and/or fix.
Okay, these are the alternatives: #1: I have a patch for gtk-doc to check for a leading '\' to escape the special purpose of %,@,#. That means your need to require gtk-doc-1.11 once its out and then you can use the local anchor but need to cange it to: <ulink url="http://www.unicode.org/reports/tr29/\#Grapheme_Cluster_Boundaries"> Verdict: ugly #2: I could check that the character before %,@,# is any of [\s,;] (are those enough?). This mean it will just work with newer gtk-doc and you don't need to modify the anchors. Verdict: slightly better, might be fragile #3: Don't expand anything inside sgml tags. Need to igure ou how to do it. Verdict: Might be the best option. So all together - no workaround :/ I've tried to rewrite the uri using %23 for the #, but guess what - gtk-doc tried to link to a constant named 23Grapheme_Cluster_Boundaries - bah.
Ideally both #1 and #3 should be implemented. Thanks.
2008-05-05 Stefan Kost <ensonic@users.sf.net> * gtkdoc-mkdb.in: * tests/bugs/docs/tester-sections.txt: * tests/bugs/src/tester.h: Don't expand '#' in ulink tags. Also allow to escape "#%@" with '\'. Add to testsuite. Fixes #530758