[gtk-doc] md_to_db: fix clsing inline media objects
- From: Stefan Sauer <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] md_to_db: fix clsing inline media objects
- Date: Sun, 12 Nov 2017 20:25:16 +0000 (UTC)
commit 0ca0d2a085828d427d9396107f1a27750a54a3c0
Author: Stefan Sauer <ensonic users sf net>
Date: Sun Nov 12 21:24:08 2017 +0100
md_to_db: fix clsing inline media objects
The code was indented too much and would produce broken xml if no title is
given.
gtkdoc/md_to_db.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtkdoc/md_to_db.py b/gtkdoc/md_to_db.py
index 2576f05..9a5d269 100644
--- a/gtkdoc/md_to_db.py
+++ b/gtkdoc/md_to_db.py
@@ -442,14 +442,16 @@ def MarkDownParseSpanElementsInner(text, markersref):
element['»'] = element['»'].replace('&', '&').replace('<', '<')
if element['!']:
+ # media link
markup += '<inlinemediaobject><imageobject><imagedata fileref="' + \
element['»'] + '"></imagedata></imageobject>'
if 'a' in element:
markup += "<textobject><phrase>" + element['a'] + "</phrase></textobject>"
- markup += "</inlinemediaobject>"
+ markup += "</inlinemediaobject>"
elif 'ref' in element:
+ # internal link
element['a'] = MarkDownParseSpanElementsInner(element['a'], markers_rest)
markup += '<link linkend="' + element['ref'] + '"'
@@ -459,6 +461,7 @@ def MarkDownParseSpanElementsInner(text, markersref):
markup += '>' + element['a'] + "</link>"
else:
+ # external link
element['a'] = MarkDownParseSpanElementsInner(element['a'], markers_rest)
markup += '<ulink url="' + element['»'] + '"'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]