projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2267e6f
)
Store entries in an array of hashes so we can later add the indentation level.
author
Fabian Keil
<fk@fabiankeil.de>
Sun, 31 Oct 2010 13:26:07 +0000
(13:26 +0000)
committer
Fabian Keil
<fk@fabiankeil.de>
Sun, 31 Oct 2010 13:26:07 +0000
(13:26 +0000)
utils/changelog2doc.pl
patch
|
blob
|
history
diff --git
a/utils/changelog2doc.pl
b/utils/changelog2doc.pl
index
d675159
..
bfa23b0
100755
(executable)
--- a/
utils/changelog2doc.pl
+++ b/
utils/changelog2doc.pl
@@
-1,6
+1,6
@@
#!/usr/bin/perl
#!/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
# $Source: /cvsroot/ijbswa/current/utils/changelog2doc.pl,v $
# Filter to parse the ChangeLog and translate the changes for
@@
-27,22
+27,25
@@
sub read_entries() {
if (/^-/) {
$i++;
if (/^-/) {
$i++;
- $entries[$i] = '';
+ $entries[$i]
{description}
= '';
}
s@^-?\s*@@;
}
s@^-?\s*@@;
- $entries[$i] .= $_;
+ $entries[$i]
{description}
.= $_;
}
print "Parsed " . @entries . " entries.\n";
}
sub create_listitem_markup($) {
my $entry = shift;
}
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" .
return " <listitem>\n" .
" <para>\n" .
- " " . $
entry
. "\n" .
+ " " . $
description
. "\n" .
" </para>\n" .
" </listitem>\n";
}
" </para>\n" .
" </listitem>\n";
}
@@
-54,8
+57,7
@@
sub generate_markup() {
" <itemizedlist>\n";
foreach my $entry (@entries) {
" <itemizedlist>\n";
foreach my $entry (@entries) {
- chomp $entry;
- $markup .= create_listitem_markup($entry);
+ $markup .= create_listitem_markup(\%{$entry});
}
$markup .= " </itemizedlist>\n" .
}
$markup .= " </itemizedlist>\n" .