Warn on use of .RS/.IP/.RE
Closes #12667
Text that is prefixed with a space is treated like an "example" and gets
output in monospace.
+Within the body, describe a lite of items like this:
+
+ ## item 1
+ description
+
+ ## item 2
+ second description
+
+The list is automatically terminated at end of file, or you can do it
+explicitly with an empty "header":
+
+ ##
+
## Header and footer
`page-header` is the file that is output before the generated options output
}
}
my @desc;
+ my $tablemode = 0;
while(<F>) {
+ $line++;
+ if(/^## (.*)/) {
+ if(!$tablemode) {
+ push @desc, ".RS\n";
+ $tablemode = 1;
+ }
+ push @desc, ".IP \"\\fB$1\\fP\"\n";
+ next;
+ }
+ elsif(/^##/) {
+ if($tablemode) {
+ # end of table
+ push @desc, ".RE\n.IP\n";
+ $tablmode = 0;
+ }
+ next;
+ }
+ elsif(/^\.(IP|RS|RE)/) {
+ my ($cmd) = ($1);
+ print STDERR "$f:$line:1:ERROR: $cmd detected, use ##-style\n";
+ }
push @desc, $_;
}
close(F);
+ if($tablemode) {
+ # end of table
+ push @desc, ".RE\n.IP\n";
+ }
my $opt;
if(defined($short) && $long) {