diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-03-01 21:06:42 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-03-01 21:06:42 +0000 |
commit | d61757486adf12ed4cb7cc112908aa2cf8a31f62 (patch) | |
tree | acc862381b6bfb34ba4656d1f0ed3dd3c83e1cde /perl-install | |
parent | 18c20b03508abb92de97d05d40da864841418754 (diff) | |
download | drakx-d61757486adf12ed4cb7cc112908aa2cf8a31f62.tar drakx-d61757486adf12ed4cb7cc112908aa2cf8a31f62.tar.gz drakx-d61757486adf12ed4cb7cc112908aa2cf8a31f62.tar.bz2 drakx-d61757486adf12ed4cb7cc112908aa2cf8a31f62.tar.xz drakx-d61757486adf12ed4cb7cc112908aa2cf8a31f62.zip |
fix section with only comments (putting the comment after the EndSection is wrong)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/Xconfig/parse.pm | 3 |
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} || ''); } #-############################################################################### |