[gtk-doc] fixxref: smarter link resolving



commit e46808f1012f4a8e23e775717b3b46c48fc5ca0a
Author: Stefan Kost <ensonic users sf net>
Date:   Wed Nov 25 22:28:27 2009 +0200

    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).

 gtkdoc-fixxref.in |    8 +++++++-
 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]