summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-12-16 20:16:43 +0100
committerTimothy Gu <timothygu99@gmail.com>2013-08-27 09:02:59 -0700
commit646bcc37e627af57f81e5e9ac9bad24a6763e841 (patch)
tree766ba98f2718c47330f8d6bf5827c5198e88658a
parent6469c199b4c5f1446becc9974535e68773e391ae (diff)
downloadffmpeg-646bcc37e627af57f81e5e9ac9bad24a6763e841.tar.gz
doc/texi2pod: add support to @ifhtml and @ifnothtml directives
With these commands it is possible to add HTML and non-HTML snippets, which will be useful for the "See Also" manual chapters. (cherry picked from commit f14e248783f45a698947a2ed6e2c82069db46bc8) Signed-off-by: Timothy Gu <timothygu99@gmail.com>
-rwxr-xr-xdoc/texi2pod.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/texi2pod.pl b/doc/texi2pod.pl
index d20fac6bf6..6702d7a542 100755
--- a/doc/texi2pod.pl
+++ b/doc/texi2pod.pl
@@ -150,14 +150,14 @@ INF: while(<$inf>) {
# Ignore @end foo, where foo is not an operation which may
# cause us to skip, if we are presently skipping.
my $ended = $1;
- next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu|iftex)$/;
+ next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu|iftex|ifhtml|ifnothtml)$/;
die "\@end $ended without \@$ended at line $.\n" unless defined $endw;
die "\@$endw ended by \@end $ended at line $.\n" unless $ended eq $endw;
$endw = pop @endwstack;
- if ($ended =~ /^(?:ifset|ifclear|ignore|menu|iftex)$/) {
+ if ($ended =~ /^(?:ifset|ifclear|ignore|menu|iftex|ifhtml|ifnothtml)$/) {
$skipping = pop @skstack;
next;
} elsif ($ended =~ /^(?:example|smallexample|display)$/) {
@@ -190,11 +190,11 @@ INF: while(<$inf>) {
next;
};
- /^\@(ignore|menu|iftex)\b/ and do {
+ /^\@(ignore|menu|iftex|ifhtml|ifnothtml)\b/ and do {
push @endwstack, $endw;
push @skstack, $skipping;
$endw = $1;
- $skipping = 1;
+ $skipping = $endw !~ /ifnothtml/;
next;
};