[gtk-doc] mkhtml2: add tag converters for <mediaobject> and <imageobject>
- From: Stefan Sauer <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] mkhtml2: add tag converters for <mediaobject> and <imageobject>
- Date: Sun, 25 Mar 2018 18:25:11 +0000 (UTC)
commit c0dbaf040d65e6378be936f6b05932d981bc8ba4
Author: Stefan Sauer <ensonic users sf net>
Date: Sun Mar 25 20:21:08 2018 +0200
mkhtml2: add tag converters for <mediaobject> and <imageobject>
gtkdoc/mkhtml2.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gtkdoc/mkhtml2.py b/gtkdoc/mkhtml2.py
index 79ba0e9..cb9d54d 100644
--- a/gtkdoc/mkhtml2.py
+++ b/gtkdoc/mkhtml2.py
@@ -371,6 +371,15 @@ def convert_entry(ctx, xml):
return result
+def convert_imageobject(ctx, xml):
+ imagedata = xml.find('imagedata')
+ if imagedata is not None:
+ # TODO(ensonic): warn on missing fileref attr?
+ return ['<img src="%s">' % imagedata.attrib.get('fileref', '')]
+ else:
+ return []
+
+
def convert_indexdiv(ctx, xml):
title_tag = xml.find('title')
title = title_tag.text
@@ -626,10 +635,12 @@ convert_tags = {
'acronym': convert_acronym,
'bookinfo': convert_bookinfo,
'blockquote': convert_blockquote,
+ 'caption': convert_div,
'colspec': convert_colspec,
'corpauthor': convert_corpauthor,
'entry': convert_entry,
'function': convert_span,
+ 'imageobject': convert_imageobject,
'indexdiv': convert_indexdiv,
'indexentry': convert_ignore,
'indexterm': convert_skip,
@@ -640,6 +651,7 @@ convert_tags = {
'link': convert_link,
'listitem': convert_listitem,
'literal': convert_literal,
+ 'mediaobject': convert_div,
'note': convert_div,
'orderedlist': convert_orderedlist,
'para': convert_para,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]