mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Consider last block as well
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user