[gtk-doc] mkhtml2: add tag converters for sect2/sect3.



commit 3816ac23a21c0dfff7fee5979ad21ff3042058a2
Author: Stefan Sauer <ensonic users sf net>
Date:   Sun Apr 1 11:05:14 2018 +0200

    mkhtml2: add tag converters for sect2/sect3.

 gtkdoc/mkhtml2.py |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/gtkdoc/mkhtml2.py b/gtkdoc/mkhtml2.py
index 569cc27..062026c 100644
--- a/gtkdoc/mkhtml2.py
+++ b/gtkdoc/mkhtml2.py
@@ -291,7 +291,7 @@ def convert__unknown(ctx, xml):
         return result
 
 
-def convert_refsect(ctx, xml, h_tag, inner_func=convert_inner):
+def convert_sect(ctx, xml, h_tag, inner_func=convert_inner):
     result = ['<div class="%s">\n' % xml.tag]
     title = xml.find('title')
     if title is not None:
@@ -673,15 +673,15 @@ def convert_refsect1(ctx, xml):
                 result.append('<hr>\n')
             result.extend(convert_tags.get(child.tag, convert__unknown)(ctx, child))
             prev = child
-    return convert_refsect(ctx, xml, 'h2', convert_inner)
+    return convert_sect(ctx, xml, 'h2', convert_inner)
 
 
 def convert_refsect2(ctx, xml):
-    return convert_refsect(ctx, xml, 'h3')
+    return convert_sect(ctx, xml, 'h3')
 
 
 def convert_refsect3(ctx, xml):
-    return convert_refsect(ctx, xml, 'h4')
+    return convert_sect(ctx, xml, 'h4')
 
 
 def convert_row(ctx, xml):
@@ -691,6 +691,14 @@ def convert_row(ctx, xml):
     return result
 
 
+def convert_sect2(ctx, xml):
+    return convert_sect(ctx, xml, 'h3')
+
+
+def convert_sect3(ctx, xml):
+    return convert_sect(ctx, xml, 'h4')
+
+
 def convert_simpara(ctx, xml):
     result = ['<p>']
     append_text(xml.text, result)
@@ -830,6 +838,8 @@ convert_tags = {
     'returnvalue': convert_span,
     'row': convert_row,
     'screen': convert_pre,
+    'sect2': convert_sect2,
+    'sect3': convert_sect3,
     'simpara': convert_simpara,
     'structfield': convert_em_class,
     'structname': convert_span,


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