[gtk-doc] md_to_db: also add the role="example" here
- From: Stefan Sauer <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] md_to_db: also add the role="example" here
- Date: Sun, 18 Mar 2018 20:27:32 +0000 (UTC)
commit ffa6f45c73372562f326dab5044690b742cce409
Author: Stefan Sauer <ensonic users sf net>
Date: Sun Mar 18 21:27:01 2018 +0100
md_to_db: also add the role="example" here
gtkdoc/md_to_db.py | 4 ++--
tests/gobject/src/gobject.c | 2 +-
tests/mk_to_db.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtkdoc/md_to_db.py b/gtkdoc/md_to_db.py
index 0b64507..c8ff324 100644
--- a/gtkdoc/md_to_db.py
+++ b/gtkdoc/md_to_db.py
@@ -688,9 +688,9 @@ def MarkDownOutputDocBook(blocksref, symbol, context):
output += "<informalexample><screen><![CDATA[\n"
tag = "screen"
else:
- output += "<informalexample><programlisting language=\"%s\"><![CDATA[\n" %
block['language']
+ output += "<informalexample><programlisting role=\"example\"
language=\"%s\"><![CDATA[\n" % block['language']
else:
- output += "<informalexample><programlisting><![CDATA[\n"
+ output += "<informalexample><programlisting role=\"example\"><![CDATA[\n"
logging.debug('listing for %s: [%s]', symbol, '\n'.join(block['lines']))
for line in block["lines"]:
diff --git a/tests/gobject/src/gobject.c b/tests/gobject/src/gobject.c
index e8bbf20..21fc8f8 100644
--- a/tests/gobject/src/gobject.c
+++ b/tests/gobject/src/gobject.c
@@ -50,7 +50,7 @@
*
* You can also change parameters:
* <informalexample>
- * <programlisting language="c"><xi:include xmlns:xi="http://www.w3.org/2003/XInclude" parse="text"
href="../../examples/gobject.c" /></programlisting>
+ * <programlisting role="example" language="c"><xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
parse="text" href="../../examples/gobject.c" /></programlisting>
* </informalexample>
*
* This example serves two main purposes:
diff --git a/tests/mk_to_db.py b/tests/mk_to_db.py
index 0c6c8b2..8cc5978 100755
--- a/tests/mk_to_db.py
+++ b/tests/mk_to_db.py
@@ -221,7 +221,7 @@ accessed via the following functions.</para>
"""
expected = '''\
-<informalexample><programlisting language="C"><![CDATA[
+<informalexample><programlisting role="example" language="C"><![CDATA[
GdkEvent *event;
GdkEventType type;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]