my $div=qr/^--------------------+$/;
my $infoline=qr/^r(\d+)\s+\|\s+([^\s]+)\s+\|\s+(\d+-\d+-\d+\s+\d+:\d+:\d+\s+[-+]?\d+).*/;
my $state='start';
- my ($rev, $user, $when, @pages, $message);
+ my ($rev, $user, $when, @pages, @message);
foreach (`LANG=C svn log -v '$svn_url'`) {
chomp;
if ($state eq 'start' && /$div/) {
}
elsif ($state eq 'body' && /$div/) {
push @ret, { rev => $rev, user => $user,
- when => $when, message => $message,
+ when => $when, message => [@message],
pages => [@pages] } if @pages;
return @ret if @ret >= $num;
@pages=();
}
elsif ($state eq 'body') {
- $message.="$_<br>\n";
+ push @message, {line => $_},
}
}
}
<TMPL_LOOP NAME="CHANGELOG">
<li> <!-- <TMPL_VAR NAME="REV"> -->
<TMPL_LOOP NAME="PAGES">
- <TMPL_VAR NAME="LINK"></a>
+ <TMPL_VAR NAME="LINK">
</TMPL_LOOP>
<br>
changed <TMPL_VAR NAME="WHEN"> by <TMPL_VAR NAME="USER">:
- <i><TMPL_VAR NAME="MESSAGE"></i>
+ <i>
+ <TMPL_LOOP NAME="MESSAGE">
+ <TMPL_IF NAME="LINE">
+ <TMPL_VAR NAME="LINE"><br>
+ </TMPL_IF>
+ </TMPL_LOOP>
+ </i>
</li>
</TMPL_LOOP>
</ul>