[gtk-doc] mkhtml2: add support for variablelists
- From: Stefan Sauer <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] mkhtml2: add support for variablelists
- Date: Fri, 30 Mar 2018 22:23:45 +0000 (UTC)
commit 327e0952fe271421cc227655d4903c36394ec254
Author: Stefan Sauer <ensonic users sf net>
Date: Sat Mar 31 00:22:06 2018 +0200
mkhtml2: add support for variablelists
gtkdoc/mkhtml2.py | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/gtkdoc/mkhtml2.py b/gtkdoc/mkhtml2.py
index ab133b8..4c93985 100644
--- a/gtkdoc/mkhtml2.py
+++ b/gtkdoc/mkhtml2.py
@@ -780,6 +780,36 @@ def convert_userinput(ctx, xml):
return result
+def convert_variablelist(ctx, xml):
+ result = ["""<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>"""]
+ convert_inner(ctx, xml, result)
+ result.append("""</tbody>
+</table></div>""")
+ return result
+
+
+def convert_varlistentry(ctx, xml):
+ result = ['<tr>']
+
+ result.append('<td><p>')
+ term = xml.find('term')
+ result.extend(convert_span(ctx, term))
+ result.append('</p></td>')
+
+ result.append('<td>')
+ listitem = xml.find('listitem')
+ convert_inner(ctx, listitem, result)
+ result.append('</td>')
+
+ result.append('<tr>')
+ return result
+
+
# TODO(ensonic): turn into class with converters as functions and ctx as self
convert_tags = {
'acronym': convert_acronym,
@@ -843,6 +873,8 @@ convert_tags = {
'ulink': convert_ulink,
'userinput': convert_userinput,
'varname': convert_code,
+ 'variablelist': convert_variablelist,
+ 'varlistentry': convert_varlistentry,
'warning': convert_div,
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]