$raw = 0;
+$firstcol = 1;
+
while (<>) {
#
# Skip editor commands
next;
}
+ if (/\$Id: /) {
+ next;
+ }
+
# Skip ###### banners
if (/^##+$/) {
next;
next;
}
+ $oldcol = $firstcol;
+ if (/^#/) {
+ $firstcol = 1;
+ } else {
+ $firstcol = 0;
+ }
+
+ if (($firstcol == 1) && ($oldcol == 0)) {
+ s/^#//;
+ }
+
#
# Comments in the configuration files get converted to plain
# text.
#
if (/^\s*#/) {
- s/^\s*#[\t ]*//;
+ s/^\s*#[\t ]{0,2}//;
#
# If we WERE printing blocks of raw output, end that, and
$raw = 0;
}
+ #
+ # Ensure that lists get formatted correctly
+ #
+ if (/^\s*\*/) {
+ print " ";
+ }
+
print;
next;
}