#!/usr/bin/perl
-# $Id: changelog2doc.pl,v 1.2 2008/09/26 16:49:09 fabiankeil Exp $
+# $Id: changelog2doc.pl,v 1.3 2010/10/31 13:25:47 fabiankeil Exp $
# $Source: /cvsroot/ijbswa/current/utils/changelog2doc.pl,v $
# Filter to parse the ChangeLog and translate the changes for
if (/^-/) {
$i++;
- $entries[$i] = '';
+ $entries[$i]{description} = '';
}
s@^-?\s*@@;
- $entries[$i] .= $_;
+ $entries[$i]{description} .= $_;
}
print "Parsed " . @entries . " entries.\n";
}
sub create_listitem_markup($) {
my $entry = shift;
+ my $description = $entry->{description};
- $entry =~ s@\n@\n @g;
+ chomp $description;
+
+ $description =~ s@\n@\n @g;
return " <listitem>\n" .
" <para>\n" .
- " " . $entry . "\n" .
+ " " . $description . "\n" .
" </para>\n" .
" </listitem>\n";
}
" <itemizedlist>\n";
foreach my $entry (@entries) {
- chomp $entry;
- $markup .= create_listitem_markup($entry);
+ $markup .= create_listitem_markup(\%{$entry});
}
$markup .= " </itemizedlist>\n" .