GNOME Bugzilla – Bug 736914
Docs: various fixes and improvements
Last modified: 2015-02-08 16:11:10 UTC
See the two attached patches.
Created attachment 286513 [details] [review] docs: syntax highlighting for the code examples In the sections Concepts, Tools and Tutorial.
Created attachment 286514 [details] [review] docs: code example for enumeration types I had to read the GTK+ code recently to have an example.
Created attachment 286537 [details] [review] docs: move GObject preface to its own file And fix the indentation. With a separate file, the content can more easily be reused, for example to glue together chapters on GLib, GObject, GIO and GTK+ into a book.
Created attachment 286538 [details] [review] docs: improve a little the GObject preface – is a longer dash.
Comment on attachment 286513 [details] [review] docs: syntax highlighting for the code examples I've pushed this one, it's trivial enough.
Created attachment 287757 [details] [review] GI annotation for g_get_charset()
Created attachment 292238 [details] [review] GI annotation for g_get_charset()
A review would be appreciated, especially for the code example for enumeration types.
Review of attachment 292238 [details] [review]: This looks fine. Thanks.
Review of attachment 286514 [details] [review]: ::: gobject/genums.c @@ +53,3 @@ + * + * Example of how to get a string representation of an enum value: + * |[<!-- language="C" --> I'm not sure that this is something that we still do in our post-XML world. Can someone else comment on that?
According to this wiki page: https://wiki.gnome.org/Projects/GTK%2B/DocumentationSyntax/Markdown > |[<!-- language="" --> is a correct syntax.
(In reply to comment #10) > Review of attachment 286514 [details] [review]: > > ::: gobject/genums.c > @@ +53,3 @@ > + * > + * Example of how to get a string representation of an enum value: > + * |[<!-- language="C" --> > > I'm not sure that this is something that we still do in our post-XML world. > Can someone else comment on that? markdown accepts HTML, and HTML comments. it's a bit unfortunate that we use comments to alter the style of the output, but this pattern is used elsewhere in our documentation, and it's not any more arbitary than the GitHub style: ```cpp if (foo) return NULL; ``` or the pymarkdown/pygments style: :::cpp if (foo) return NULL;
Comment on attachment 286514 [details] [review] docs: code example for enumeration types So the markdown syntax with the HTML comment is fine, so I've pushed the commit. Thanks for the review!