Branch Coverage

lib/Text/Frundis/Processing.pm
Criterion Covered Total %
branch 1048 1298 80.7


line true false branch
233 0 60 unless $Opts{'target_format'} =~ /^(?:latex|xhtml|epub)$/u
235 30 30 if ($Opts{'target_format'} eq 'xhtml')
237 3 27 unless $Opts{'all_in_one_file'}
273 0 60 if ($ENV{'FRUNDISLIB'})
274 0 0 if ($^O eq 'MSWin32') { }
291 0 60 unless open STDOUT, '>&', $stdout_copy
292 0 60 unless open STDERR, '>&', $stderr_copy
294 59 1 if ($Opts{'input_file'}) { }
1 0 elsif ($Opts{'input_string'}) { }
297 0 59 if $Opts{'input_string'}
301 0 59 unless open $FH, '< :bytes', $File
328 0 60 unless open $FH, '<', \$SourceText
331 48 0 if ($Opts{'redirect_stderr'} and $Opts{'all_in_one_file'} && $Opts{'target_format'} eq 'xhtml' || $Opts{'target_format'} eq 'latex')
337 0 48 unless open STDERR, '>', $Opts{'output_file'}
343 27 33 if ($Opts{'target_format'} eq 'latex') { }
30 3 elsif ($Opts{'target_format'} eq 'xhtml') { }
3 0 elsif ($Opts{'target_format'} eq 'epub') { }
344 0 27 unless open $FH, '<', \$SourceText
345 26 1 if (defined $Opts{'output_file'})
349 2 25 if ($Opts{'standalone'}) { }
359 0 30 unless open $FH, '<', \$SourceText
360 27 3 if (defined $Opts{'output_file'} and $Opts{'all_in_one_file'}) { }
3 0 elsif (defined $Opts{'output_file'}) { }
364 3 0 unless (-d $Opts{'output_file'})
365 0 3 unless mkdir $Opts{'output_file'}
367 0 3 unless open STDOUT, '>', catfile($Opts{'output_file'}, 'index.html')
371 6 24 if ($Opts{'standalone'}) { }
375 3 3 unless ($Opts{'all_in_one_file'})
376 3 0 if ($Param{'xhtml-index'} eq 'full') { }
0 0 elsif ($Param{'xhtml-index'} eq 'summary') { }
384 3 3 if ($State{'_xhtml_navigation_text'})
396 3 0 unless (-d $Opts{'output_file'})
397 0 3 unless mkdir $Opts{'output_file'}
400 3 0 unless (-d $EPUB)
401 0 3 unless mkdir $EPUB
404 3 0 unless (-d $META_INF)
405 0 3 unless mkdir $META_INF
409 0 3 unless open $FH, '<', \$SourceText
411 0 3 unless open STDOUT, '>', $index_xhtml
423 48 5 $Opts{'redirect_stderr'} ? :
425 0 53 unless open STDOUT, $mode, $Opts{'output_file'}
426 48 5 if ($Opts{'redirect_stderr'})
427 0 48 unless open STDERR, '>&', 'STDOUT'
445 42 2505 if /^\.\s*$/u
447 357 2148 if ($Scope{'de'} and not /^\.\s*#\./u) { }
12 4263 elsif ($Count{'if_ignore'} and not /^\.\s*(?:#;|#if)/u) { }
448 267 90 unless $DeMacro{'ignore'}
455 505 1631 unless /^\.\s*(.*)/u
472 0 1631 unless (defined $macro)
480 78 2 if ($macro eq '#.' and $Scope{'de'})
492 88 1544 if ($Macro{$macro}) { }
1540 4 elsif (exists $BuiltinMacroHandler{$macro}) { }
507 4 7 if $State{'text'} and $State{'wants_space'}
511 2 58 if $Flag{'ns'}
522 4 2543 if /\h$/u
524 42 2505 if /^\.\s*$/u
526 357 2148 if ($Scope{'de'} and not /^\.\s*#\./u) { }
12 4263 elsif ($Count{'if_ignore'} and not /^\.\s*(?:#;|#if)/u) { }
527 267 90 unless $DeMacro{'ignore'}
534 1631 505 if (/^\.\s*(.*)/u) { }
550 0 1631 unless (defined $macro)
558 78 1553 if ($macro eq '#.' and $Scope{'de'}) { }
32 1521 elsif ($Flag{'_verbatim'}) { }
567 480 1151 $State{'text'} ? :
573 480 25 unless ($Flag{'_ignore_text'})
580 32 78 if ($text)
581 0 32 if ($Flag{'_verbatim'}) { }
594 5 1637 if (not $Macro{$macro} and test_if_not_allowed_macro($macro))
597 88 1549 if ($Macro{$macro}) { }
1545 4 elsif (exists $BuiltinMacroHandler{$macro}) { }
618 30 34 unless ($Process)
619 0 30 if $opts{'id'}
622 0 34 if ($opts{'id'} =~ /\s/u)
626 2 32 if (@Arg)
633 16 18 $opts{'t'} ? :
635 0 34 if (@{$Scope{'Bd'};} and $Scope{'Bd'}[0]{'t'} eq 'literal') { }
647 8 26 if ($opts{'t'} eq 'literal') { }
650 4 4 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
4 0 elsif ($Opts{'target_format'} eq 'latex') { }
660 8 18 if ($opts{'t'}) { }
11 7 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
662 0 8 unless defined $Xdtag{$opts{'t'}}
664 6 2 if ($cmd) { }
1 1 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
683 0 34 if ($opts{'id'})
684 0 0 if $Opts{'target_format'} eq 'latex'
692 25 25 unless $Process
705 1 24 $UserMacroCall{'depth'} > 0 ? :
706 1 24 $UserMacroCall{'depth'} > 0 ? :
708 2 23 if (defined $opts{'filter'})
714 2 2 unless (defined $opts{'f'} or $opts{'t'})
720 2 21 if ($opts{'t'})
721 0 2 unless (defined $Filters{$opts{'t'}})
726 0 2 if (defined $BfMacro{'filter'})
732 10 13 if (defined $opts{'f'} and not $opts{'f'} =~ /$Rx{'format'}/u) { }
5 8 elsif ($State{'text'}) { }
743 76 76 if ($Process) { }
759 4 72 if (defined $opts{'t'} and $opts{'t'} eq 'verse') { }
34 64 elsif (defined $opts{'t'} and $opts{'t'} eq 'table') { }
762 0 4 unless $title
777 8 26 unless $title
791 0 76 unless $Process
803 0 76 unless ($opts{'t'} =~ /^(?:item|enum|desc|verse|table)$/u)
808 6 70 if (@{$Scope{'Bl'};}) { }
809 0 6 unless ($Scope{'Bl'}[0]{'t'} =~ /^(?:item|enum)$/u)
814 2 4 if ($State{'text'})
825 4 72 if ($opts{'t'} eq 'verse') { }
6 66 elsif ($opts{'t'} eq 'desc') { }
26 40 elsif ($opts{'t'} eq 'item') { }
6 34 elsif ($opts{'t'} eq 'enum') { }
34 0 elsif ($opts{'t'} eq 'table') { }
847 26 8 if (@Arg)
850 8 18 if ($Opts{'target_format'} eq 'latex') { }
858 12 22 if ($Opts{'target_format'} eq 'latex')
859 1 11 unless (defined $columns)
863 8 4 if ($columns =~ /^\d+$/u) { }
876 4 0 if (@Arg)
879 2 2 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u)
882 4 0 if (defined $title)
890 2 2 if $Opts{'target_format'} eq 'latex'
892 2 2 if ($Opts{'target_format'} eq 'latex')
907 34 42 unless ($Process)
908 2 32 if $opts{'id'}
911 0 42 if ($opts{'id'} =~ /\s/u)
918 0 42 if (defined $opts{'t'} and not defined $Xmtag{$opts{'t'}})
926 10 32 if (defined $opts{'t'})
932 2 8 if (defined $Xmtag{$opts{'t'}}{'begin'})
937 2 40 if ($opts{'id'})
938 1 1 if ($Opts{'target_format'} eq 'latex')
944 10 32 if (@Arg)
945 2 8 if (not $State{'inline'}) { }
955 28 36 unless $Process
956 2 34 unless (@{$Scope{'Bd'};})
962 8 26 if ($st->{'t'} eq 'literal') { }
963 6 2 if ($State{'text'})
967 4 4 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
4 0 elsif ($Opts{'target_format'} eq 'latex') { }
979 8 18 if ($st->{'t'}) { }
11 7 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
7 0 elsif ($Opts{'target_format'} eq 'latex') { }
981 6 2 if ($cmd) { }
1 1 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
1 0 elsif ($Opts{'target_format'} eq 'latex') { }
1002 29 29 unless $Process
1003 2 27 unless (defined $Scope{'format'})
1007 17 10 if (not $Scope{'format'} or $Scope{'format'} =~ /$Rx{'format'}/u)
1008 1 16 if ($BfMacro{'filter'}) { }
2 14 elsif ($BfMacro{'filter_tag'} and defined $Filters{$BfMacro{'filter_tag'}}{'code'}) { }
1031 78 78 unless $Process
1032 2 76 unless (@{$Scope{'Bl'};})
1038 10 66 unless ($Scope{'item'})
1039 0 10 if ($st->{'t'} eq 'desc') { }
2 8 elsif ($st->{'t'} eq 'enum' or $st->{'t'} eq 'item') { }
0 8 elsif ($State{'text'}) { }
1055 4 72 if ($st->{'t'} eq 'verse') { }
6 66 elsif ($st->{'t'} eq 'desc') { }
6 60 elsif ($st->{'t'} eq 'enum') { }
26 34 elsif ($st->{'t'} eq 'item') { }
34 0 elsif ($st->{'t'} eq 'table') { }
1057 2 2 if ($Opts{'target_format'} eq 'latex')
1060 2 2 if $Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u
1090 6 70 @{$Scope{'Bl'};} ? :
1098 26 8 if ($Scope{'item'})
1103 26 8 if (defined $State{'_table_title'})
1104 8 18 if ($Opts{'target_format'} eq 'latex') { }
1119 30 44 unless $Process
1120 2 42 unless (@{$Scope{'Bm'};})
1129 10 32 if (defined $st->{'t'})
1130 2 8 if (defined $Xmtag{$st->{'t'}}{'end'})
1138 18 24 if (@Arg)
1142 1 41 if ($st->{'id'} and $Opts{'target_format'} eq 'latex')
1146 8 34 if (@Arg)
1147 2 6 if (not $State{'inline'}) { }
1151 0 6 $Flag{'ns'} ? :
1158 23 23 unless $Process
1167 2 21 unless (defined $opts{'f'})
1172 2 19 if (@{$Scope{'Bl'};} and not $Scope{'item'})
1177 10 9 if ($opts{'f'} =~ /$Rx{'format'}/u)
1178 6 4 if ($State{'text'})
1181 3 7 if (defined $opts{'filter'}) { }
1203 2 44 if (defined $opts{'f'} and not $opts{'f'} =~ /$Rx{'format'}/u)
1206 4 40 unless (@Arg)
1207 2 2 if $Process
1212 12 28 if ($opts{'as-is'}) { }
1213 6 6 unless $Process
1216 2 4 if $State{'wants_space'} and not $Flag{'ns'}
1218 2 4 if (defined $opts{'filter'}) { }
2 2 elsif (defined $opts{'t'}) { }
1223 0 2 unless (defined $Filters{$opts{'t'}})
1228 2 0 if (defined $Filters{$opts{'t'}}{'code'}) { }
0 0 elsif (defined $Filters{$opts{'t'}}{'shell'}) { }
1245 4 24 if ($file =~ /::/u) { }
0 24 elsif (not $file =~ m[[/\.]]u) { }
1246 0 4 if ($file =~ /\./u)
1256 0 0 unless -f $file
1258 0 28 unless (-f $file)
1261 0 28 unless open my $fh, '<', $file
1264 14 14 if ($Process) { }
1276 27 27 if ($Process) { }
1292 27 0 if (@Arg)
1296 8 19 if (@Arg >= 2)
1311 10 17 @Arg > 1 ? :
1318 19 8 if (@Arg == 1) { }
8 0 elsif (@Arg >= 2) { }
1331 2 6 if (@Arg > 2)
1334 2 6 if ($image =~ /[{}]/u or $label =~ /[{}]/u)
1345 3 3 if ($Opts{'target_format'} eq 'latex') { }
3 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
1358 0 3 if ($Opts{'target_format'} eq 'epub') { }
1372 0 3 if (defined $opts{'link'}) { }
1391 2 17 if ($image =~ /[\{\}]/u)
1398 6 11 if ($Opts{'target_format'} eq 'latex') { }
2 9 elsif ($Opts{'target_format'} eq 'epub') { }
9 0 elsif ($Opts{'target_format'} eq 'xhtml') { }
1416 1 8 if (defined $opts{'link'}) { }
1429 127 127 unless $Process
1431 2 125 unless (@{$Scope{'Bl'};})
1439 8 117 if ($st->{'t'} eq 'desc') { }
60 57 elsif ($st->{'t'} =~ /^(?:item|enum)$/u) { }
45 12 elsif ($st->{'t'} eq 'table') { }
12 0 elsif ($st->{'t'} eq 'verse') { }
1457 2 6 if ($Scope{'item'})
1461 0 8 unless (@Arg)
1470 30 30 if ($Scope{'item'})
1475 18 42 if (@Arg)
1476 0 18 $Flag{'ns'} ? :
1482 19 26 if ($Scope{'item'})
1488 30 15 unless ($Opts{'target_format'} eq 'latex')
1491 39 6 if (@Arg)
1492 0 39 $Flag{'ns'} ? :
1498 6 6 if (not $Scope{'paragraph'}) { }
6 0 elsif ($Scope{'item'}) { }
1507 8 4 if (@Arg)
1513 26 26 unless $Process
1520 2 24 unless (@Arg)
1527 0 24 if ($Param{'lang'} eq 'fr' and $close_delim =~ /^(?:!|:|\?|;)$/u)
1531 6 18 if (@Arg >= 2) { }
18 0 elsif (@Arg == 1) { }
1532 2 4 if (@Arg > 2)
1538 3 3 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
3 0 elsif ($Opts{'target_format'} eq 'latex') { }
1554 9 9 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
9 0 elsif ($Opts{'target_format'} eq 'latex') { }
1567 78 78 unless $Process
1568 20 58 if ($Scope{'paragraph'}) { }
37 21 elsif ($State{'text'}) { }
8 13 elsif ($Opts{'target_format'} eq 'latex') { }
1579 4 74 if ($State{'macro'} eq 'D') { }
17 57 elsif (@Arg) { }
1585 6 11 if ($Opts{'target_format'} eq 'latex') { }
11 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
1608 65 77 unless ($Process)
1609 9 56 if $opts{'id'}
1612 0 77 if ($opts{'id'} =~ /\s/u)
1616 45 32 @Arg > 1 ? :
1619 4 73 if (defined $opts{'t'} and not defined $Xmtag{$opts{'t'}})
1624 73 4 if (@Arg) { }
1635 20 53 if (defined $opts{'t'})
1640 4 16 if (defined $Xmtag{$opts{'t'}}{'begin'})
1643 4 16 if (defined $Xmtag{$opts{'t'}}{'end'})
1650 9 64 if ($opts{'id'})
1651 2 7 if ($Opts{'target_format'} eq 'latex')
1660 94 92 unless $Process
1671 14 78 @Arg > 1 ? :
1672 2 90 unless (@Arg)
1676 0 4 unless (defined $Self->{'loX'}{$opts{'t'}} or $opts{'id'})
1685 71 19 unless ($opts{'id'})
1687 2 69 unless (exists $Self->{'loX'}{$opts{'t'}}{$id})
1695 15 75 $opts{'name'} ? :
1697 23 67 if ($Opts{'target_format'} eq 'latex') { }
67 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
1698 3 20 if ($opts{'id'}) { }
19 1 elsif ($valid_title) { }
1699 0 3 unless ($ID{$id})
1714 16 51 if ($opts{'id'}) { }
50 1 elsif ($valid_title) { }
1715 0 16 if (not $ID{$id}) { }
1734 67 66 unless $Process
1735 3 63 unless (@{$Scope{'Bl'};})
1739 2 61 unless ($State{'under_table_scope'})
1743 2 59 unless ($Scope{'item'})
1755 51 8 if (@Arg)
1761 55 55 if ($Process) { }
1781 27 28 if $opts{'mini'}
1782 0 27 if $opts{'mini'} and $opts{'lof'}
1783 0 27 if $opts{'mini'} and $opts{'lot'}
1784 0 27 if $opts{'mini'} and $opts{'toc'}
1805 46 9 unless ($opts{'toc'} or $opts{'lof'} or $opts{'lot'})
1808 0 0 if ($opts{'toc'} and $opts{'lof'} or $opts{'toc'} and $opts{'lot'} or $opts{'lof'} and $opts{'lot'})
1818 15 40 if ($Opts{'target_format'} eq 'latex') { }
40 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
1819 3 12 if ($opts{'summary'}) { }
1825 6 9 if ($opts{'mini'}) { }
1826 0 6 if ($opts{'lof'}) { }
0 6 elsif ($opts{'lot'}) { }
1837 0 9 if ($opts{'lof'}) { }
2 7 elsif ($opts{'lot'}) { }
1849 0 40 if ($opts{'lof'}) { }
7 33 elsif ($opts{'lot'}) { }
1862 202 202 if $Process
1863 0 202 unless (@Arg)
1870 22 180 if ($cmd eq 'dtag') { }
3 177 elsif ($cmd eq 'ftag') { }
50 127 elsif ($cmd eq 'mtag') { }
127 0 elsif ($cmd eq 'set') { }
1894 2 20 unless (defined $opts{'f'})
1899 2 18 unless ($opts{'f'} =~ /$Rx{'valid_format'}/u)
1903 9 9 unless $opts{'f'} =~ /$Rx{'format'}/u
1904 1 8 unless (defined $opts{'t'})
1912 5 3 if (defined $opts{'c'})
1913 1 4 unless ($opts{'c'} =~ /^[a-zA-Z]*$/u)
1918 3 2 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u)
1923 2 1 unless $opts{'c'} eq '' or $HtmlContainingFlow{$opts{'c'}}
1939 0 3 if (defined $opts{'f'})
1940 0 0 unless ($opts{'f'} =~ /$Rx{'valid_format'}/u)
1944 0 0 unless $opts{'f'} =~ /$Rx{'format'}/u
1946 0 3 unless (defined $opts{'t'})
1950 0 0 if ($opts{'shell'} and $opts{'code'})
1956 3 0 if ($opts{'code'})
1976 4 46 unless (defined $opts{'f'})
1981 2 44 unless ($opts{'f'} =~ /$Rx{'valid_format'}/u)
1986 22 22 unless $opts{'f'} =~ /$Rx{'format'}/u
1988 3 19 unless (defined $opts{'t'})
1994 13 6 if (defined $opts{'c'} and $opts{'c'} =~ /^[a-zA-Z]*$/u)
1995 0 13 unless ($opts{'c'} =~ /^[a-zA-Z]*$/u)
2000 7 6 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u)
2005 1 6 unless $opts{'c'} eq '' or $HtmlPhrasing{$opts{'c'}}
2011 9 10 if (defined $opts{'b'})
2014 9 10 if (defined $opts{'e'})
2028 8 119 if (defined $opts{'f'})
2029 0 8 unless ($opts{'f'} =~ /$Rx{'valid_format'}/u)
2033 4 4 unless $opts{'f'} =~ /$Rx{'format'}/u
2035 2 121 unless (@Arg >= 2)
2039 2 119 if (@Arg > 2)
2044 4 117 unless ($AllowedParam{$parameter})
2051 25 96 if ($parameter =~ /^document-(?:author|date|title)$/u) { }
1 95 elsif ($parameter eq 'nbsp') { }
2 93 elsif ($parameter eq 'xhtml-index' and not $Param{$parameter} =~ /^(?:full|summary|none)$/u) { }
1 92 elsif ($parameter eq 'epub-version') { }
9 83 elsif ($parameter eq 'lang') { }
2067 0 1 unless $Param{$parameter} =~ /^(?:2|3)$/u
2070 9 0 if ($IndexTraductions{$Param{'lang'}})
2077 0 160 if ($Scope{'de'})
2078 0 0 if $Process
2090 0 160 unless (@Arg)
2091 0 0 if $Process
2096 0 160 if ($name =~ /^[A-Z][a-z]$/u or $name =~ /^#/u)
2108 72 88 if (defined $opts{'f'})
2109 0 72 unless ($opts{'f'} =~ /$Rx{'valid_format'}/u)
2110 0 0 if $Process
2114 36 36 unless ($opts{'f'} =~ /$Rx{'format'}/u)
2119 0 160 if (@Arg and $Process)
2130 0 16 unless (@Arg)
2134 0 16 if (defined $opts{'f'})
2135 0 0 unless ($opts{'f'} =~ /$Rx{'valid_format'}/u)
2140 0 0 unless $opts{'f'} =~ /$Rx{'format'}/u
2144 16 0 if (@arg) { }
2154 4 156 unless ($Scope{'de'})
2155 2 2 if $Process
2160 36 120 if ($DeMacro{'ignore'})
2165 60 60 if $DeMacro{'perl'}
2166 60 60 if ($DeMacro{'perl'}) { }
2183 18 18 unless $Process
2184 2 16 unless (@Arg)
2189 6 10 unless ($AllowedFlag{$key})
2192 12 4 if (defined $value) { }
4 0 elsif (defined $Flag{$key}) { }
2193 0 12 if (defined $Flag{$key} and $value eq $Flag{$key})
2208 185 185 if ($Process) { }
2221 2 183 unless (@Arg)
2227 24 159 if ($macro eq 'Pt') { }
75 84 elsif ($macro eq 'Ch') { }
84 0 elsif ($macro eq 'Sh' or $macro eq 'Ss') { }
2236 54 30 if ($Opts{'all_in_one_file'}) { }
2248 2 181 if (exists $Self->{'loX'}{'toc'}{$title})
2263 99 84 if ($macro =~ /^(?:Pt|Ch)$/u)
2290 2 183 unless (@Arg)
2299 9 174 if $opts{'nonum'}
2308 99 84 if ($State{'macro'} =~ /^(?:Pt|Ch)$/u)
2310 30 69 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u and not $Opts{'all_in_one_file'})
2320 56 127 if ($Opts{'target_format'} eq 'latex') { }
67 60 elsif ($Opts{'target_format'} eq 'xhtml' and $Opts{'all_in_one_file'}) { }
60 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
2322 54 2 if ($numbered) { }
2350 120 63 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u and not $opts{'nonum'})
2352 120 0 if $num
2362 56 127 if ($Opts{'target_format'} eq 'latex') { }
127 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
2364 54 2 if ($numbered) { }
2385 0 54 if ($Count{'if_ignore'})
2394 8 46 unless (defined $opts{'f'} or @Arg)
2399 26 20 if (defined $opts{'f'})
2400 0 26 unless ($opts{'f'} =~ /$Rx{'valid_format'}/u)
2401 0 0 if $Process
2404 12 14 unless ($opts{'f'} =~ /$Rx{'format'}/u)
2410 24 10 if (@Arg)
2412 0 24 if (@Arg)
2413 0 0 if $Process
2416 6 18 unless ($bool)
2423 18 32 if $Count{'if_ignore'}
2424 46 4 if (@{$Scope{'#if'};}) { }
2428 2 2 if $Process
2438 90 86 unless ($perl)
2440 18 72 unless ($text)
2450 4 68 if $text =~ /\\+\$\d/u
2458 150 8 if ($UserMacroCall{'depth'} == 0)
2464 86 72 if ($perl) { }
2471 0 72 unless open my $fh, '<', \$text
2472 36 36 if ($Process) { }
2481 150 8 if ($UserMacroCall{'depth'} == 0)
2493 14 3 if ($Flag{'fr-nbsp-auto'})
2502 2 1014 $Flag{'ns'} ? :
2511 11 1 if ($Process) { }
2521 90 344 if ($Scope{'paragraph'}) { }
124 220 elsif ($State{'text'}) { }
2535 2 8 if (defined $st->{'t'})
2546 6 1173 if (test_for_unclosed_block($type))
2550 4 2 if ($type eq 'Bm') { }
0 2 elsif ($type eq 'Bl') { }
2 0 elsif ($type eq 'Bd') { }
2564 6 143 if (defined $UserMacroCall{'lnum'}) { }
143 0 elsif (defined $State{'lnum'}) { }
0 0 elsif ($File) { }
2580 0 120 if $Flag{'_no_warnings'}
2584 0 120 if ($Opts{'use_carp'}) { }
2597 0 0 if ($Opts{'use_carp'}) { }
2607 0 29 if $Flag{'_no_warnings'}
2611 0 29 if ($Opts{'use_carp'}) { }
2623 4 408 unless ($elt)
2626 344 64 if (defined $opts) { }
2627 0 344 unless ref $opts eq 'HASH'
2634 156 252 if ($Opts{'target_format'} eq 'latex') { }
252 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
2635 40 116 $opts->{'env'} ? :
2639 145 107 if ($opts->{'class'})
2642 137 115 if ($opts->{'id'})
2651 4 408 unless ($elt)
2654 84 324 if (defined $opts) { }
2655 0 84 unless ref $opts eq 'HASH'
2661 156 252 if ($Opts{'target_format'} eq 'latex') { }
252 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
2662 40 116 $opts->{'env'} ? :
2670 22 29 if ($State{'text'})
2702 17 3007 if ($Param{'lang'} eq 'fr' and not $Flag{'_verbatim'})
2706 1136 1888 if ($Opts{'target_format'} eq 'latex') { }
1888 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
2718 90 107 if $Opts{'target_format'} eq 'latex'
2739 35 76 if (@Arg and $Arg[$#Arg] =~ /^(?:\\~)?\p{Punct}+$/u and not $Arg[$#Arg] =~ /^\\&/u)
2744 0 35 if ($Param{'lang'} eq 'fr')
2753 32 733 if $State{'wanted_space'}
2763 87 0 unless ($Scope{'paragraph'})
2773 87 188 if ($Opts{'target_format'} eq 'latex' and not $last)
2782 48 318 if ($macro eq 'Pt') { }
150 168 elsif ($macro eq 'Ch') { }
112 56 elsif ($macro eq 'Sh') { }
56 0 elsif ($macro eq 'Ss') { }
2784 48 0 unless $nonum
2792 146 4 unless $nonum
2800 98 14 unless $nonum
2806 56 0 unless $nonum
2814 341 94 if ($InfosFlag{'has_part'}) { }
86 8 elsif ($InfosFlag{'has_chapter'}) { }
2821 137 74 $header_macro eq 'Sh' ? :
160 211 $header_macro eq 'Ch' ? :
64 371 $header_macro eq 'Pt' ? :
2829 9 174 if $nonum
2832 24 150 if ($macro eq 'Pt') { }
73 77 elsif ($macro eq 'Ch') { }
49 28 elsif ($macro eq 'Sh') { }
28 0 elsif ($macro eq 'Ss') { }
2839 43 6 if ($InfosFlag{'has_chapter'}) { }
2847 26 2 if ($InfosFlag{'has_chapter'}) { }
2 0 elsif ($Count{'numbered_section'}) { }
2862 27 33 if ($Opts{'target_format'} eq 'latex') { }
33 0 elsif ($Opts{'target_format'} eq 'xhtml' or $Opts{'target_format'} eq 'epub') { }
2919 3 57 if ($Opts{'target_format'} eq 'epub')
2940 1 59 defined $Opts{'filters'} ? :
2993 2 118 defined $Opts{'user_macros'} ? :
3003 20 2 if (defined $repl) { }
3024 6 40 unless (defined $loXstack{$class})
3040 223 53 if (not $Flag{'ns'} || $ns and $State{'wants_space'} || $State{'text'})
3041 16 207 $State{'inline'} ? :
3052 87 242 if (not $Scope{'paragraph'} || $Scope{'item'} || $State{'inline'}) { }
3082 1140 983 unless $flag =~ s/^-//u
3085 4 979 unless ($spec->{$flag})
3090 720 259 if ($spec->{$flag} eq 's') { }
259 0 elsif ($spec->{$flag} eq 'b') { }
3093 4 716 unless (@Arg)
3100 716 0 if (defined $arg and not $arg =~ /^-/u)
3116 3262 0 if ($text =~ s/^(\S+)//u) { }
3143 0 33 unless (-f $file)
3147 0 33 unless open my $fh, '<', $file
3165 0 6 if ($?) { }
3181 0 283 unless open STDOUT, '>', \$title_render
3187 28 439 if ($word =~ /^(?:Bm|Em|Sm)$/u) { }
3197 4 307 unless @$args
3198 28 279 if ($args->[0] =~ /^(?:Bm|Em|Sm)$/u) { }
3222 2 8 if (defined $st->{'t'})
3256 0 206 unless defined $Scope{$type}
3266 4 202 $UserMacroCall{'depth'} > 0 ? :
4 202 $UserMacroCall{'depth'} > 0 ? :
4 202 $UserMacroCall{'depth'} > 0 ? :
3274 0 0 if (-f $fpath)
3284 0 4 unless open my $fh, '<', $file
3295 8 1231 if (@$stack)
3299 8 0 $File eq $st->{'file'} ? :
3301 0 8 $st->{'in_user_macro'} ? :
3302 0 8 $st->{'t'} ? :
3305 2 6 if $macro ne 'End Of File'
3308 8 0 !$State{'inline'} ? :
3318 2 58 if ($Scope{'de'})
3326 2 1583 if ($Scope{'format'})
3329 2 0 $File eq $BfMacro{'begin_file'} ? :
3332 0 2 $BfMacro{'in_macro'} ? :
3343 2 1552 if (not $macro =~ /^Ef$/u and test_for_unclosed_format_block()) { }
1 1551 elsif ($Flag{'_verbatim'} and not $macro =~ /^Ef|Ed$/u) { }
2 1567 elsif (@{$Scope{'Bl'};} and $Scope{'Bl'}[0]{'t'} ne 'verse' and not $AllowedInBl{$macro}) { }
3369 3 0 unless (-d $images_dir)
3372 2 1 if @Image or defined $Param{'epub-cover'}
3376 1 4 unless $image
3378 0 4 unless (-f $image)
3381 0 4 unless (-f $image)
3385 2 2 if -f $new_image
3386 0 2 unless copy($image, $new_image)
3392 0 3 unless ($Param{'document-title'})
3404 2 1 if $cover
3410 1 2 if ($Param{'epub-version'} =~ /^3/u)
3418 2 1 if ($cover)
3427 0 3 unless open my $fh, '>', $container_xml
3448 0 3 unless open STDOUT, '>', $content_opf
3455 3 0 if (defined $Param{'epub-uuid'})
3459 0 3 unless (defined $Param{'epub-uuid'})
3463 0 0 if ($@) { }
3476 1 2 if $Param{'epub-version'} =~ /^3/u
3479 2 1 if $Param{'epub-version'} =~ /^2/u
3493 1 2 if ($Param{'epub-version'} =~ /^3/u)
3496 1 0 if ($deterministic) { }
3502 1 0 if $Param{'epub-version'} =~ /^3/u
3506 2 1 if ($Param{'epub-subject'})
3511 2 1 if ($Param{'document-author'})
3516 1 2 if $cover and not !($Param{'epub-version'} =~ /^3/u)
3519 2 1 if ($Param{'epub-metadata'})
3526 1 2 if $Param{'epub-version'} =~ /^3/u
3538 2 1 if ($cover)
3545 1 2 if $cover and $Param{'epub-version'} =~ /^3/u
3548 2 1 if $cover
3551 2 1 if $cover
3561 15 15 unless $_->{'macro'} =~ /^(?:Pt|Ch)$/u
3575 2 0 if ($image_name =~ /\.png$/u) { }
0 0 elsif ($image_name =~ /\.jpe?g$/u) { }
0 0 elsif ($image_name =~ /\.gif$/u) { }
0 0 elsif ($image_name =~ /\.svg$/u) { }
3602 2 1 if $cover
3609 15 15 unless $_->{'macro'} =~ /^(?:Pt|Ch)$/u
3615 1 2 if $Param{'epub-version'} =~ /^3/u
3622 2 1 if $cover
3637 0 2 unless open STDOUT, '>', $cover_xhtml
3658 2 1 if ($Param{'epub-css'})
3659 0 2 unless (-f $Param{'epub-css'})
3662 0 2 unless open my $fh, '<', "$Param{'epub-css'}"
3669 0 3 unless open my $fh, '>', $stylesheet_css
3680 0 3 unless open my $fh, '>', $mimetype_path
3690 0 1 unless open STDOUT, '>', $nav_xhtml
3700 1 0 if $title
3712 0 1 if $Param{'epub-nav-landmarks'}
3724 0 3 unless open STDOUT, '>', $toc_ncx
3738 3 0 if $title
3757 1 1 if ($Param{'latex-preamble'}) { }
3761 1 0 if ($InfosFlag{'has_chapter'} or $InfosFlag{'has_part'}) { }
3776 0 1 if $InfosFlag{'use_minitoc'}
3779 0 1 if $InfosFlag{'use_verse'}
3782 0 1 if $InfosFlag{'use_graphicx'}
3797 0 2 if $InfosFlag{'dominilof'}
3798 0 2 if $InfosFlag{'dominilot'}
3799 0 2 if $InfosFlag{'dominitoc'}
3801 1 1 if $Param{'title-page'}
3820 10 0 $macro eq 'Pt' ? :
16 10 $macro eq 'Ss' ? :
33 26 $macro eq 'Sh' ? :
55 59 $macro eq 'Ch' ? :
3824 14 27 if ($Opts{'target_format'} eq 'epub' and $Param{'epub-version'} =~ /^3/u or $Opts{'target_format'} eq 'xhtml' and $Param{'xhtml5'}) { }
3840 7 34 if ($Opts{'target_format'} eq 'epub' and $Param{'epub-version'} =~ /^3/u) { }
3858 39 0 if $title
3861 0 39 if $Param{'favicon'}
3864 12 27 if ($Param{'epub-css'} and $Opts{'target_format'} eq 'epub') { }
14 26 elsif ($Param{'xhtml-css'} and $Opts{'target_format'} eq 'xhtml') { }
3878 14 7 if ($Opts{'target_format'} ne 'epub' and $Param{'xhtml-top'})
3884 14 7 if ($Opts{'target_format'} ne 'epub' and $Param{'xhtml-bottom'})
3896 12 3 if ($Opts{'target_format'} ne 'epub' and $State{'_xhtml_navigation_text'})
3902 15 15 if ($Opts{'target_format'} eq 'epub') { }
3912 0 30 unless open STDOUT, '>', $out_file
3915 15 15 if $Opts{'target_format'} eq 'epub'
3921 12 3 unless $State{'nav_count'} <= 1
3923 12 3 unless $State{'nav_count'} >= @{$loXstack{'nav'};}
3929 12 3 if (defined $previous) { }
3943 12 3 if (defined $next) { }
3967 0 11 unless defined $loXstack{$class} and @{$loXstack{$class};}
3981 168 80 if ($Opts{'all_in_one_file'}) { }
30 50 elsif ($hasfile) { }
3985 15 15 $Opts{'target_format'} eq 'epub' ? :
3989 21 29 $Opts{'target_format'} eq 'epub' ? :
3992 42 8 $Count{'part'} || $Count{'chapter'} ? :
4012 6 3 if ($Param{'title-page'})
4015 0 6 unless $Param{'document-title'}
4018 0 6 unless $Param{'document-date'}
4022 0 6 unless $Param{'document-author'}
4023 6 0 if $Param{'document-title'}
4026 6 0 if $Param{'document-author'}
4029 6 0 if $Param{'document-date'}
4040 0 40 unless @{$loXstack{'toc'};}
4046 20 1 if ($opts->{'mini'} and $State{'nav_count'})
4052 1 36 $type eq 'nav' ? :
3 37 $type eq 'ncx' ? :
4056 1 0 $type eq 'nav' ? :
36 1 $type eq 'xhtml' ? :
3 37 $type eq 'ncx' ? :
4063 3 37 if ($type eq 'ncx') { }
36 1 elsif ($type eq 'xhtml') { }
1 0 elsif ($type eq 'nav') { }
4076 28 8 if ($opts->{'mini'} or defined $opts->{'title'}) { }
4082 16 20 if $title
4089 1 0 if $Param{'document-title'}
4104 86 174 if ($opts->{'mini'})
4105 14 72 if $macro eq $mini_macro or $macro eq 'Pt'
4107 110 136 if ($opts->{'summary'})
4108 0 110 if ($opts->{'mini'} and $mini_macro eq 'Ch') { }
4109 0 0 unless $macro eq 'Sh'
4112 65 45 unless $macro =~ /^(?:Pt|Ch)$/u
4118 40 141 if ($level == 0) { }
75 66 elsif ($title_level > $previous_title_level) { }
36 30 elsif ($title_level < $previous_title_level) { }
30 0 elsif ($title_level == $previous_title_level) { }
4124 53 22 if ($type eq 'xhtml') { }
6 16 elsif ($type eq 'nav') { }
4135 5 31 if $diference + $level < 1
4142 0 36 if $level < 1
4149 30 151 if ($type eq 'ncx') { }
140 11 elsif ($type eq 'xhtml') { }
11 0 elsif ($type eq 'nav') { }
4151 28 2 if $num
4164 10 1 if $num
4169 40 0 if $level > 0
4175 3 37 if ($type eq 'ncx') { }
36 1 elsif ($type eq 'xhtml') { }
1 0 elsif ($type eq 'nav') { }
4192 118 2 unless ($opts->{'nonum'} or $href =~ /^index/u and not $Opts{'all_in_one_file'})
4195 92 26 if ($opts->{'toc'}) { }
4197 90 2 if $num
4203 76 90 if ($Opts{'all_in_one_file'}) { }