summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@users.sf.net>2019-05-05 13:55:33 +0200
committerStefan Sauer <ensonic@users.sf.net>2019-05-05 13:55:33 +0200
commitf08c2a2cbb145145591ab77d8617ba9d0bd6ad01 (patch)
tree8412aeeb0a88351999d88c03a29bfaf8cf7bb05f
parent83a9b030ff74fb264b194fa5e33cc2733aa2b7c8 (diff)
downloadgtk-doc-f08c2a2cbb145145591ab77d8617ba9d0bd6ad01.tar.gz
docs: document hwo to hint the source code language
Fixes #79
-rw-r--r--help/manual/C/index.docbook14
1 files 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>