summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-03-01 21:06:42 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-03-01 21:06:42 +0000
commitd61757486adf12ed4cb7cc112908aa2cf8a31f62 (patch)
treeacc862381b6bfb34ba4656d1f0ed3dd3c83e1cde /perl-install/Xconfig
parent18c20b03508abb92de97d05d40da864841418754 (diff)
downloaddrakx-backup-do-not-use-d61757486adf12ed4cb7cc112908aa2cf8a31f62.tar
drakx-backup-do-not-use-d61757486adf12ed4cb7cc112908aa2cf8a31f62.tar.gz
drakx-backup-do-not-use-d61757486adf12ed4cb7cc112908aa2cf8a31f62.tar.bz2
drakx-backup-do-not-use-d61757486adf12ed4cb7cc112908aa2cf8a31f62.tar.xz
drakx-backup-do-not-use-d61757486adf12ed4cb7cc112908aa2cf8a31f62.zip
fix section with only comments (putting the comment after the EndSection is wrong)
Diffstat (limited to 'perl-install/Xconfig')
-rw-r--r--perl-install/Xconfig/parse.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/Xconfig/parse.pm b/perl-install/Xconfig/parse.pm
index d8c8057c6..609534b54 100644
--- a/perl-install/Xconfig/parse.pm
+++ b/perl-install/Xconfig/parse.pm
@@ -118,6 +118,7 @@ sub raw_to_string {
my $s = do {
if ($e->{l}) {
my $inside = join('', map_index { raw_to_string($_, $::i) } @{$e->{l}});
+ $inside .= $e->{post_comment} || '';
$inside =~ s/^/ /mg;
qq(\n$e->{kind} "$e->{name}"\n) . $inside . "End$e->{kind}";
} else {
@@ -126,7 +127,7 @@ sub raw_to_string {
(defined $e->{val} ? ($e->{Option} && $e->{val} !~ /^"/ ? qq( "$e->{val}") : qq( $e->{val})) : '');
}
};
- ($e->{pre_comment} ? ($b_want_spacing ? "\n" : '') . $e->{pre_comment} : '') . $s . ($e->{comment_on_line} || '') . "\n" . ($e->{post_comment} || '');
+ ($e->{pre_comment} ? ($b_want_spacing ? "\n" : '') . $e->{pre_comment} : '') . $s . ($e->{comment_on_line} || '') . "\n" . (!$e->{l} && $e->{post_comment} || '');
}
#-###############################################################################