[gi-docgen/docs-fixes: 2/3] docs: Use syntax highlighting for code fragments




commit 131e31309747bf84c24487431e879ff20ae6f2fd
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Apr 1 11:25:44 2021 +0100

    docs: Use syntax highlighting for code fragments

 docs/linking.rst | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/docs/linking.rst b/docs/linking.rst
index 45566cf..a2e3d14 100644
--- a/docs/linking.rst
+++ b/docs/linking.rst
@@ -11,13 +11,13 @@ by using a qualifier fragment and the symbol name.
 
 For instance:
 
-::
+.. code-block:: c
 
-    /**
-     * ExampleFoo:
-     *
-     * This structure is related to [struct@Bar].
-     */
+   /**
+    * ExampleFoo:
+    *
+    * This structure is related to [struct@Bar].
+    */
 
     /**
      * example_foo_set_bar:
@@ -31,6 +31,7 @@ For instance:
      * Sets an instance of [`Bar`](struct.Bar.html) on `Foo`.
      */
 
+
 will all link to ``Bar``.
 
 Backticks will be stripped, so ``[`class@Foo`]`` will correctly link to ``Foo``.
@@ -153,7 +154,7 @@ with gi-docgen-generated documentation, as long as you provide it with
 a mapping from the namespace names to a base url for the docs. This is
 done by defining a JavaScript map called ``baseURLs`` like this:
 
-::
+.. code-block:: js
 
     baseURLs = [
       [ 'Pango', 'https://gnome.pages.gitlab.gnome.org/pango/Pango/' ],


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]