[gi-docgen/ebassi/issue-92] template: Fix link generation for class methods




commit 4b09a74dd3117ed96ea2c080ad186acaa07890bb
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sun Jun 27 14:37:41 2021 +0100

    template: Fix link generation for class methods
    
    The link pattern for class methods is:
    
        class_method.ClassName.method_name.html
    
    where `ClassName` is the instance structure for the given class
    structure.
    
    Fixes: #92

 gidocgen/templates/basic/search.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gidocgen/templates/basic/search.js b/gidocgen/templates/basic/search.js
index 8913f69..4a0f768 100644
--- a/gidocgen/templates/basic/search.js
+++ b/gidocgen/templates/basic/search.js
@@ -182,7 +182,7 @@ function getLinkForDocument(doc) {
         case "bitfield": return "flags." + doc.name + ".html";
         case "callback": return "callback." + doc.name + ".html";
         case "class": return "class." + doc.name + ".html";
-        case "class_method": return "class_method." + doc.type_name + "." + doc.name + ".html";
+        case "class_method": return "class_method." + doc.struct_for + "." + doc.name + ".html";
         case "constant": return "const." + doc.name + ".html";
         case "ctor": return "ctor." + doc.type_name + "." + doc.name + ".html";
         case "domain": return "error." + doc.name + ".html";


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