diff options
| author | Ingo Schwarze <schwarze@openbsd.org> | 2018-12-16 00:17:02 +0000 |
|---|---|---|
| committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-12-16 00:17:02 +0000 |
| commit | fb7ea55796176565141285c5c6de1d3127655116 (patch) | |
| tree | 63b21db96671f3ca27e3f0658ae34a5d8babc63d /regress/regress.pl | |
| parent | d672f8cb82878baf3834e938c4c416f4493952cf (diff) | |
| download | mandoc-fb7ea55796176565141285c5c6de1d3127655116.tar.gz mandoc-fb7ea55796176565141285c5c6de1d3127655116.zip | |
Yet another round of improvements to manual font selection.
Unify handling of \f and .ft.
Support \f4 (bold+italic).
Support ".ft BI" and ".ft CW" for terminal output.
Support the .ft request in HTML output.
Reject the bogus fonts \f(C1, \f(C2, \f(C3, and \f(CP.
In regress.pl, only strip leading whitespace in math mode.
Diffstat (limited to 'regress/regress.pl')
| -rwxr-xr-x | regress/regress.pl | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/regress/regress.pl b/regress/regress.pl index 8d7245cb..9d8fcf58 100755 --- a/regress/regress.pl +++ b/regress/regress.pl @@ -1,6 +1,6 @@ #!/usr/bin/env perl # -# $Id: regress.pl,v 1.8 2017/07/18 18:47:06 schwarze Exp $ +# $Id: regress.pl,v 1.9 2018/12/16 00:17:04 schwarze Exp $ # # Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> # @@ -79,23 +79,25 @@ sub syshtml ($@) { open my $outfd, '>', $outfile or die "$outfile: $!"; my $infd; my $pid = open3 undef, $infd, undef, @_; - my $state; + my $state = 0; while (<$infd>) { chomp; if (!$state && s/.*<math class="eqn">//) { - $state = 1; + $state = 'math'; next unless length; + } elsif (/^BEGINTEST/) { + $state = 'other'; } - $state = 1 if /^BEGINTEST/; - if ($state && s/<\/math>.*//) { + if ($state eq 'math') { s/^ *//; - print $outfd "$_\n" if length; - undef $state; - next; + if (s/<\/math>.*//) { + print $outfd "$_\n" if length; + $state = 0; + next; + } } - s/^ *//; print $outfd "$_\n" if $state; - undef $state if /^ENDTEST/; + $state = 0 if /^ENDTEST/; } close $outfd; close $infd; |
