[gtk-doc] docs: document hwo to hint the source code language
- From: Stefan Sauer <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] docs: document hwo to hint the source code language
- Date: Sun, 5 May 2019 11:56:47 +0000 (UTC)
commit f08c2a2cbb145145591ab77d8617ba9d0bd6ad01
Author: Stefan Sauer <ensonic users sf net>
Date: Sun May 5 13:55:33 2019 +0200
docs: document hwo to hint the source code language
Fixes #79
help/manual/C/index.docbook | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/help/manual/C/index.docbook b/help/manual/C/index.docbook
index 384e27e..3be6ff5 100644
--- a/help/manual/C/index.docbook
+++ b/help/manual/C/index.docbook
@@ -1843,7 +1843,7 @@ int main(int argc, char *argv[])
<programlisting><![CDATA[
<example>
<title>Using a GHashTable.</title>
- <programlisting>
+ <programlisting language="C">
...
</programlisting>
</example>
@@ -1853,18 +1853,22 @@ int main(int argc, char *argv[])
<informalexample>
<programlisting><![CDATA[
<informalexample>
- <programlisting>
+ <programlisting language="C">
...
</programlisting>
</informalexample>
]]></programlisting>
</informalexample>
+ In both cases, the language attribute is optional and is used as a hint
+ to the syntax highlighting engine (pygments for html output).
For the latter GTK-Doc also supports an abbreviation:
-<![CDATA[
-|[
+ <informalexample>
+ <programlisting><![CDATA[
+|[<!-- language="C" -->
...
]|
-]]>
+]]></programlisting>
+ </informalexample>
</para>
<para>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]