texi2pod.pl: Handle @multitable.

contrib/
	* texi2pod.pl: Handle @multitable.

From-SVN: r121646
This commit is contained in:
Richard Sandiford 2007-02-06 13:14:18 +00:00 committed by Richard Sandiford
parent 568265573d
commit 427e84f7fe
2 changed files with 22 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2007-02-06 Richard Sandiford <richard@codesourcery.com>
* texi2pod.pl: Handle @multitable.
2007-01-15 Tom Tromey <tromey@redhat.com>
* download_ecj: New file.

View file

@ -162,6 +162,8 @@ while(<$inf>) {
} elsif ($ended =~ /^(?:itemize|enumerate|[fv]?table)$/) {
$_ = "\n=back\n";
$ic = pop @icstack;
} elsif ($ended eq "multitable") {
$_ = "\n=back\n";
} else {
die "unknown command \@end $ended at line $.\n";
}
@ -278,6 +280,12 @@ while(<$inf>) {
$endw = "enumerate";
};
/^\@multitable\s.*/ and do {
push @endwstack, $endw;
$endw = "multitable";
$_ = "\n=over 4\n";
};
/^\@([fv]?table)\s+(\@[a-z]+)/ and do {
push @endwstack, $endw;
push @icstack, $ic;
@ -297,6 +305,16 @@ while(<$inf>) {
$_ = ""; # need a paragraph break
};
/^\@item\s+(.*\S)\s*$/ and $endw eq "multitable" and do {
@columns = ();
for $column (split (/\s*\@tab\s*/, $1)) {
# @strong{...} is used a @headitem work-alike
$column =~ s/^\@strong{(.*)}$/$1/;
push @columns, $column;
}
$_ = "\n=item ".join (" : ", @columns)."\n";
};
/^\@itemx?\s*(.+)?$/ and do {
if (defined $1) {
# Entity escapes prevent munging by the <> processing below.