From: <no...@so...> - 2010-10-31 13:25:54
|
Update of /cvsroot/ijbswa/current/utils In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv11257/utils Modified Files: changelog2doc.pl Log Message: Factor create_listitem_markup() out of generate_markup(). Index: changelog2doc.pl =================================================================== RCS file: /cvsroot/ijbswa/current/utils/changelog2doc.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- changelog2doc.pl 26 Sep 2008 16:49:09 -0000 1.2 +++ changelog2doc.pl 31 Oct 2010 13:25:47 -0000 1.3 @@ -36,6 +36,17 @@ print "Parsed " . @entries . " entries.\n"; } +sub create_listitem_markup($) { + my $entry = shift; + + $entry =~ s@\n@\n @g; + return " <listitem>\n" . + " <para>\n" . + " " . $entry . "\n" . + " </para>\n" . + " </listitem>\n"; +} + sub generate_markup() { my $markup = ''; @@ -44,14 +55,9 @@ foreach my $entry (@entries) { chomp $entry; - $entry =~ s@\n@\n @g; - $markup .= " <listitem>\n" . - " <para>\n" . - " " . $entry . "\n" . - " </para>\n" . - " </listitem>\n" - ; + $markup .= create_listitem_markup($entry); } + $markup .= " </itemizedlist>\n" . "</para>\n"; |