From ed2109d2720af25592acb999475d510ca7c36479 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 3 Nov 2022 10:45:56 +0100 Subject: [PATCH] docs: xsl: Don't format empty sections in API manual MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The LXC module has no exported 'Types' but the XSL template which generates the 'libvirt-libvirt-lxc.html' page would try to format it anyways. This would result in an empty non-pair version of the '
'
tag to be used in the page, which didn't render well with modern
browsers for some reason. All following sections would become children
of the non-pair 
.

Fix the XSL template to not generate empty 'Types' or 'Functions'
sections similarly to how we do with 'Macros'.

Signed-off-by: Peter Krempa 
Reviewed-by: Ján Tomko 
---
 docs/newapi.xsl | 48 ++++++++++++++++++++++++++++--------------------
 1 file changed, 28 insertions(+), 20 deletions(-)

diff --git a/docs/newapi.xsl b/docs/newapi.xsl
index d48b1fbecd..7b0085930f 100644
--- a/docs/newapi.xsl
+++ b/docs/newapi.xsl
@@ -756,18 +756,22 @@
             
           
-

Types

-
-          
-            
-          
-        
-

Functions

-
-          
-            
-          
-        
+ +

Types

+
+            
+              
+            
+          
+
+ +

Functions

+
+            
+              
+            
+          
+

Description

@@ -777,14 +781,18 @@ -

Types

- - - -

Functions

- - - + +

Types

+ + + +
+ +

Functions

+ + + +