[gtk-doc] Support |[<!-- language="C" -->



commit 26bf8d03b58333ef4ee8814d0ce72cc828f3bfec
Author: William Jon McCann <william jon mccann gmail com>
Date:   Mon Jan 27 16:06:06 2014 -0500

    Support |[<!-- language="C" -->
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723118

 gtkdoc-mkdb.in |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 8367847..aa45ed6 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -2760,11 +2760,10 @@ sub ExpandAbbreviations {
   my ($symbol, $text) = @_;
 
   # Convert "|[" and "]|" into the start and end of program listing examples.
-  # FIXME: we like to have a way to specify parameters e.g. language="c"
+  # Support \[<!-- language="C" --> modifiers
+  $text =~ s%\|\[<!-- language="([^"]+)" -->%<informalexample><programlisting language="$1"><![CDATA[%g;
   $text =~ s%\|\[%<informalexample><programlisting><![CDATA[%g;
   $text =~ s%\]\|%]]></programlisting></informalexample>%g;
-  # TODO: check for a xml comment after |[ and pick the language attribute from
-  # that
 
   # keep CDATA unmodified, preserve ulink tags (ideally we preseve all tags
   # as such)


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