[PATCH 2 of 2] Fixed dirindex and varindex to output top level module name

Sergey Kandaurov pluknet at nginx.com
Wed Jan 24 16:15:59 UTC 2024


# HG changeset patch
# User Sergey Kandaurov <pluknet at nginx.com>
# Date 1706112783 -14400
#      Wed Jan 24 20:13:03 2024 +0400
# Node ID cf7c914743d1d549af23a9f39e0a70377432fcf4
# Parent  e798f596b284259985e35f1486b31004fae00d4d
Fixed dirindex and varindex to output top level module name.

diff --git a/xsls/link.xsls b/xsls/link.xsls
--- a/xsls/link.xsls
+++ b/xsls/link.xsls
@@ -50,7 +50,11 @@ X:template = "links" {
         <a href="{substring-before(@doc, '.xml')}.html#{@id}">!{@id}</a>
         X:if "count(../link[@id = current()/@id]) > 1" {
             X:text{ (}
-            !{substring-before(substring-after(@doc, '/'), '.xml')}
+            X:if "contains(@doc, '/')" {
+                !{substring-before(substring-after(@doc, '/'), '.xml')}
+            } else {
+                !{substring-before(@doc, '.xml')}
+            }
             X:text{)}
         }
         <br/>
@@ -62,7 +66,11 @@ X:template = "varlinks" {
         <a href="{substring-before(@doc, '.xml')}.html#{@id}">!!;</a>
         X:if "count(../link[@id = current()/@id and @doc != current()/@doc]) > 0" {
             X:text{ (}
-            !{substring-before(substring-after(@doc, '/'), '.xml')}
+            X:if "contains(@doc, '/')" {
+                !{substring-before(substring-after(@doc, '/'), '.xml')}
+            } else {
+                !{substring-before(@doc, '.xml')}
+            }
             X:text{)}
         }
         <br/>


More information about the nginx-devel mailing list