From 33145f2e646b6acd7cf3ec35f9508b37a1015551 Mon Sep 17 00:00:00 2001 From: Ilia Rostovtsev Date: Mon, 28 Dec 2020 16:18:21 +0300 Subject: [PATCH] Consider last block as well --- web-lib-funcs.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index dc0f5248c..5a67ccf1a 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -195,7 +195,7 @@ if ($sorted_by && $sorted_by_sectioning_preserved) { my @block; # Build blocks of line's key separated with a new line break - @lines = ($model =~ m/(.*?)$join|(^\s*$)/gm); + @lines = (($model =~ m/(.*?)$join|(^\s*$)/gm), undef, undef); for (my $line = 0; $line < scalar(@lines) - 1; $line += 2) { if ($lines[$line] =~ /\S+/) { push(@block, $lines[$line]);