[gnome-devel-docs] programming-guidelines: Use styles to indicate valid code samples



commit 2c73514a14abc1fba35a99c44532add851924b9f
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Tue Feb 3 10:58:57 2015 +0000

    programming-guidelines: Use styles to indicate valid code samples
    
    Rather than using comments at the top of the code example which could be
    missed or mistaken for part of the code sample. Also remove some
    extraneous whitespace and set the content type of the <code> elements.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=376123

 programming-guidelines/C/documentation.page |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/programming-guidelines/C/documentation.page b/programming-guidelines/C/documentation.page
index 4662557..0a20303 100644
--- a/programming-guidelines/C/documentation.page
+++ b/programming-guidelines/C/documentation.page
@@ -127,9 +127,7 @@
       be placed in the source file, directly above the function.
     </p>
 
-    <code>
-/* valid */
-/**
+    <code mime="text/x-csrc" style="valid">/**
  * gtk_get_flow:
  * @widget: a #GtkWidget
  *
@@ -145,8 +143,7 @@ gtk_get_flow (GtkWidget *widget)
 
   ...
 
-}
-    </code>
+}</code>
 
     <p>
       Documentation comments for macros, function types, class
@@ -159,9 +156,7 @@ gtk_get_flow (GtkWidget *widget)
       after the license header:
     </p>
 
-    <code>
-/* valid */
-/**
+    <code mime="text/x-csrc" style="valid">/**
  * SECTION:gtksizerequest
  * @Short_Description: Height-for-width geometry management
  * @Title: GtkSizeRequest
@@ -169,8 +164,7 @@ gtk_get_flow (GtkWidget *widget)
  * The GtkSizeRequest interface is GTK+'s height-for-width (and
  * width-for-height) geometry management system.
  * ...
- */
-    </code>
+ */</code>
 
     <p>
       Keep in mind that in order to include a function, macro,


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