commit 0b7a10b32bab919fa594d290dc173e0dd14973e8 parent 24dd329ec39b730ce99bfe1af9702dbb00f5178c Author: lash <dev@holbrook.no> Date: Wed, 19 Jun 2024 19:22:54 +0100 Parse changelog line-by-line Diffstat:
M | Bluto.pm | | | 13 | +++++++++++-- |
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/Bluto.pm b/Bluto.pm @@ -213,8 +213,17 @@ sub from_config { my $fp = File::Spec->catfile ( $env->{content_dir}, $fn ); if (open(my $f, "<$fp")) { $m_main{changelog} = ''; - while (<$f>) { - $m_main{changelog} .= $_; + my $i = 0; + while (!eof($f)) { + my $v = readline($f); + if ($v =~ /^[a-zA-Z0-9]/) { + chomp($v); + if ($i > 0) { + $m_main{changelog} .= "\n"; + } + $m_main{changelog} .= '* ' . $v; + } + $i++; } close($f); info('read changelog info from ' . $fp);