summaryrefslogtreecommitdiff
path: root/gtkdoc-fixxref.in
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2009-11-25 22:28:27 +0200
committerStefan Kost <ensonic@users.sf.net>2009-11-25 22:28:27 +0200
commite46808f1012f4a8e23e775717b3b46c48fc5ca0a (patch)
tree63ac70b6793fded611bcef3a2cd6848a40254537 /gtkdoc-fixxref.in
parent850664d444e5bfd14bd64753b0bf3e16eefa7264 (diff)
downloadgtk-doc-e46808f1012f4a8e23e775717b3b46c48fc5ca0a.tar.gz
fixxref: smarter link resolving
Only try s/:/--/ if id contains a :. Also if we don't get a href try without a trailing 's' if there is any (plural handling).
Diffstat (limited to 'gtkdoc-fixxref.in')
-rwxr-xr-xgtkdoc-fixxref.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtkdoc-fixxref.in b/gtkdoc-fixxref.in
index 1f33ccb..bee9a0f 100755
--- a/gtkdoc-fixxref.in
+++ b/gtkdoc-fixxref.in
@@ -322,11 +322,17 @@ sub MakeXRef {
my $href = $Links{$id};
# this is a workaround for some inconsitency we have with CreateValidSGMLID
- if (!$href) {
+ if (!$href && $id =~ m/:/) {
my $tid = $id;
$tid =~ s/:/--/g;
$href = $Links{$tid};
}
+ # poor mans plural support
+ if (!$href && $id =~ m/s$/) {
+ my $tid = $id;
+ $tid =~ s/s$//g;
+ $href = $Links{$tid};
+ }
if ($href) {
# if it is a link to same module, remove path to make it work