[gtk-doc] mkdb: add role=example to detect those
- From: Stefan Sauer <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] mkdb: add role=example to detect those
- Date: Sun, 18 Mar 2018 18:34:12 +0000 (UTC)
commit b4ddc9af6a3040bdff91b5ed75ccfae16dd81b37
Author: Stefan Sauer <ensonic users sf net>
Date: Sun Mar 18 19:32:14 2018 +0100
mkdb: add role=example to detect those
This simplifies matching example in mkhtml2.
gtkdoc/mkdb.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtkdoc/mkdb.py b/gtkdoc/mkdb.py
index 62e790c..f5e8995 100644
--- a/gtkdoc/mkdb.py
+++ b/gtkdoc/mkdb.py
@@ -2689,8 +2689,9 @@ def ExpandAbbreviations(symbol, text):
# Convert "|[" and "]|" into the start and end of program listing examples.
# Support \[<!-- language="C" --> modifiers
- text = re.sub(r'\|\[<!-- language="([^"]+)" -->', r'<informalexample><programlisting
language="\1"><![CDATA[', text)
- text = re.sub(r'\|\[', r'<informalexample><programlisting><![CDATA[', text)
+ text = re.sub(r'\|\[<!-- language="([^"]+)" -->',
+ r'<informalexample><programlisting role="example" language="\1"><![CDATA[', text)
+ text = re.sub(r'\|\[', r'<informalexample><programlisting role="example"><![CDATA[', text)
text = re.sub(r'\]\|', r']]></programlisting></informalexample>', text)
# keep CDATA unmodified, preserve ulink tags (ideally we preseve all tags
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]