[gtk-doc] Fix deprecation version without message



commit 45305270959d7cf8becf4920440c8a0bc6724a34
Author: William Jon McCann <william jon mccann gmail com>
Date:   Thu Feb 6 19:05:24 2014 -0500

    Fix deprecation version without message
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707717

 gtkdoc-mkdb.in |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index a273aea..aa34f08 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -3073,24 +3073,26 @@ sub MakeIndexterms {
 sub MakeDeprecationNote {
     my ($symbol) = $_[0];
     my $desc = "";
-    my $note = "";
     if (exists $Deprecated{$symbol}) {
-        $desc .= "<warning>";
+        my $note;
 
-        if ($Deprecated{$symbol} =~ /^\s*([0-9\.]+)\s*:?/) {
-                $desc .= "<para><literal>$symbol</literal> has been deprecated since version $1 and should 
not be used in newly-written code.";
+        $desc .= "<warning><para><literal>$symbol</literal> ";
+
+        $note = $Deprecated{$symbol};
+
+        if ($note =~ /^\s*([0-9\.]+)\s*:?/) {
+                $desc .= "has been deprecated since version $1 and should not be used in newly-written 
code.</para>";
         } else {
-                $desc .= "<para><literal>$symbol</literal> is deprecated and should not be used in 
newly-written code.";
+                $desc .= "is deprecated and should not be used in newly-written code.</para>";
         }
-        if ($Deprecated{$symbol} ne "") {
-            $note = &ConvertMarkDown($symbol, $Deprecated{$symbol});
-            $note =~ s/^\s*([0-9\.]+)\s*:?\s*//;
-            $note =~ s/^\s+//;
-            $note =~ s/\s+$//;
-            $note =~ s%\n{2,}%\n</para>\n<para>\n%g;
+        $note =~ s/^\s*([0-9\.]+)\s*:?\s*//;
+        $note =~ s/^\s+//;
+        $note =~ s/\s+$//;
+        if ($note ne "") {
+            $note = &ConvertMarkDown($symbol, $note);
             $desc .= " " . $note;
         }
-        $desc .= "</para></warning>\n";
+        $desc .= "</warning>\n";
     }
     return $desc;
 }


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