[gtk-doc] mkhtml2: add tag converter for 'tag'



commit 73d665f4396f87870c85ba5e40dd19b861c14cdf
Author: Stefan Sauer <ensonic users sf net>
Date:   Sun May 13 14:38:38 2018 +0200

    mkhtml2: add tag converter for 'tag'

 gtkdoc/mkhtml2.py |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gtkdoc/mkhtml2.py b/gtkdoc/mkhtml2.py
index e9b1590..d9b7bb8 100644
--- a/gtkdoc/mkhtml2.py
+++ b/gtkdoc/mkhtml2.py
@@ -979,6 +979,19 @@ def convert_table(ctx, xml):
     return result
 
 
+def convert_tag(ctx, xml):
+    attrs = ''
+    try:
+        attrs = ' class="sgmltag-%s"' % xml.attrib['class']
+    except KeyError:
+        pass
+    result = ['<code%s>' % attrs]
+    append_text(ctx, xml.text, result)
+    result.append('</code>')
+    append_text(ctx, xml.tail, result)
+    return result
+
+
 def convert_tbody(ctx, xml):
     result = ['<tbody>']
     ctx['table.entry'] = 'td'
@@ -1171,6 +1184,7 @@ convert_tags = {
     'synopsis': convert_pre,
     'symbol': convert_span,
     'table': convert_table,
+    'tag': convert_tag,
     'tbody': convert_tbody,
     'term': convert_span,
     'tgroup': convert_tgroup,


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