Branch Coverage

lib/Text/Frundis/Processing.pm
Criterion Covered Total %
branch 1054 1306 80.7


line true false branch
234 0 60 unless $Opts{'target_format'} =~ /^(?:latex|xhtml|epub)$/u
236 30 30 if ($Opts{'target_format'} eq 'xhtml')
238 3 27 unless $Opts{'all_in_one_file'}
276 0 60 if ($ENV{'FRUNDISLIB'})
277 0 0 if ($^O eq 'MSWin32') { }
294 0 60 unless open STDOUT, '>&', $stdout_copy
295 0 60 unless open STDERR, '>&', $stderr_copy
297 59 1 if ($Opts{'input_file'}) { }
1 0 elsif ($Opts{'input_string'}) { }
300 0 59 if $Opts{'input_string'}
304 0 59 unless open $FH, '< :bytes', $File
331 0 60 unless open $FH, '<', \$SourceText
334 48 0 if ($Opts{'redirect_stderr'} and $Opts{'all_in_one_file'} && $Opts{'target_format'} eq 'xhtml' || $Opts{'target_format'} eq 'latex')
340 0 48 unless open STDERR, '>', $Opts{'output_file'}
348 27 33 if ($Opts{'target_format'} eq 'latex') { }
30 3 elsif ($Opts{'target_format'} eq 'xhtml') { }
3 0 elsif ($Opts{'target_format'} eq 'epub') { }
349 0 27 unless open $FH, '<', \$SourceText
350 26 1 if (defined $Opts{'output_file'})
354 2 25 if ($Opts{'standalone'}) { }
364 0 30 unless open $FH, '<', \$SourceText
365 27 3 if (defined $Opts{'output_file'} and $Opts{'all_in_one_file'}) { }
3 0 elsif (defined $Opts{'output_file'}) { }
369 3 0 unless (-d $Opts{'output_file'})
370 0 3 unless mkdir $Opts{'output_file'}
372 0 3 unless open STDOUT, '>', catfile($Opts{'output_file'}, 'index.html')
376 6 24 if ($Opts{'standalone'}) { }
380 3 3 unless ($Opts{'all_in_one_file'})
381 3 0 if ($Param{'xhtml-index'} eq 'full') { }
0 0 elsif ($Param{'xhtml-index'} eq 'summary') { }
389 3 3 if ($State{'_xhtml_navigation_text'})
401 3 0 unless (-d $Opts{'output_file'})
402 0 3 unless mkdir $Opts{'output_file'}
405 3 0 unless (-d $EPUB)
406 0 3 unless mkdir $EPUB
409 3 0 unless (-d $META_INF)
410 0 3 unless mkdir $META_INF
414 0 3 unless open $FH, '<', \$SourceText
416 0 3 unless open STDOUT, '>', $index_xhtml
428 48 5 $Opts{'redirect_stderr'} ? :
430 0 53 unless open STDOUT, $mode, $Opts{'output_file'}
431 48 5 if ($Opts{'redirect_stderr'})
432 0 48 unless open STDERR, '>&', 'STDOUT'
448 72 2070 if ($Scope{'de'} and not @$block == 3 && $block->[0] eq '#.') { }
12 4107 elsif ($Count{'if_ignore'} and not @$block == 3 && $block->[0] =~ /^(?:#;|#if)$/u) { }
449 59 13 unless ($DeMacro{'ignore'})
460 423 1635 unless @$block == 3
472 90 1546 if ($Macro{$macro}) { }
1542 4 elsif (exists $BuiltinMacroHandler{$macro}) { }
487 4 7 if $State{'text'} and $State{'wants_space'}
491 2 58 if $Flag{'ns'}
503 4 2473 if /\h$/u
505 42 2435 if /^\.\s*$/u
507 1621 814 if (/^\.\s*(.*)/u) { }
521 0 1621 unless (defined $macro)
527 445 1176 if ($text)
537 457 357 unless ($text_lnum)
543 12 57 if ($text)
558 72 2070 if ($Scope{'de'} and not @$block == 3 && $block->[0] eq '#.') { }
12 4107 elsif ($Count{'if_ignore'} and not @$block == 3 && $block->[0] =~ /^(?:#;|#if)$/u) { }
559 59 13 unless ($DeMacro{'ignore'})
570 1635 423 if (@$block == 3) { }
574 480 1155 $State{'text'} ? :
579 411 12 unless ($Flag{'_ignore_text'})
580 14 397 if ($Flag{'_verbatim'}) { }
596 5 1641 if (not $Macro{$macro} and test_if_not_allowed_macro($macro))
599 90 1551 if ($Macro{$macro}) { }
1547 4 elsif (exists $BuiltinMacroHandler{$macro}) { }
620 30 34 unless ($Process)
621 0 30 if $opts{'id'}
624 0 34 if ($opts{'id'} =~ /\s/u)
628 2 32 if (@Arg)
635 16 18 $opts{'t'} ? :
637 0 34 if (@{$Scope{'Bd'};} and $Scope{'Bd'}[0]{'t'} eq 'literal') { }
649 8 26 if ($opts{'t'} eq 'literal') { }
652 4 4 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
4 0 elsif ($Opts{'target_format'} eq 'latex') { }
662 8 18 if ($opts{'t'}) { }
11 7 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
664 0 8 unless defined $Xdtag{$opts{'t'}}
666 6 2 if ($cmd) { }
1 1 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
685 0 34 if ($opts{'id'})
686 0 0 if $Opts{'target_format'} eq 'latex'
694 25 25 unless $Process
707 1 24 $UserMacroCall{'depth'} > 0 ? :
708 1 24 $UserMacroCall{'depth'} > 0 ? :
710 2 23 if (defined $opts{'filter'})
716 2 2 unless (defined $opts{'f'} or $opts{'t'})
722 2 21 if ($opts{'t'})
723 0 2 unless (defined $Filters{$opts{'t'}})
728 0 2 if (defined $BfMacro{'filter'})
734 10 13 if (defined $opts{'f'} and not $opts{'f'} =~ /$Rx{'format'}/u) { }
5 8 elsif ($State{'text'}) { }
745 76 76 if ($Process) { }
761 4 72 if (defined $opts{'t'} and $opts{'t'} eq 'verse') { }
34 64 elsif (defined $opts{'t'} and $opts{'t'} eq 'table') { }
764 0 4 unless $title
779 8 26 unless $title
793 0 76 unless $Process
805 0 76 unless ($opts{'t'} =~ /^(?:item|enum|desc|verse|table)$/u)
810 6 70 if (@{$Scope{'Bl'};}) { }
811 0 6 unless ($Scope{'Bl'}[0]{'t'} =~ /^(?:item|enum)$/u)
816 2 4 if ($State{'text'})
827 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') { }
849 26 8 if (@Arg)
852 8 18 if ($Opts{'target_format'} eq 'latex') { }
860 12 22 if ($Opts{'target_format'} eq 'latex')
861 1 11 unless (defined $columns)
865 8 4 if ($columns =~ /^\d+$/u) { }
878 4 0 if (@Arg)
881 2 2 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u)
884 4 0 if (defined $title)
892 2 2 if $Opts{'target_format'} eq 'latex'
894 2 2 if ($Opts{'target_format'} eq 'latex')
909 34 42 unless ($Process)
910 2 32 if $opts{'id'}
913 0 42 if ($opts{'id'} =~ /\s/u)
920 0 42 if (defined $opts{'t'} and not defined $Xmtag{$opts{'t'}})
928 10 32 if (defined $opts{'t'})
934 2 8 if (defined $Xmtag{$opts{'t'}}{'begin'})
939 2 40 if ($opts{'id'})
940 1 1 if ($Opts{'target_format'} eq 'latex')
946 10 32 if (@Arg)
947 2 8 if (not $State{'inline'}) { }
957 28 36 unless $Process
958 2 34 unless (@{$Scope{'Bd'};})
964 8 26 if ($st->{'t'} eq 'literal') { }
965 6 2 if ($State{'text'})
969 4 4 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
4 0 elsif ($Opts{'target_format'} eq 'latex') { }
981 8 18 if ($st->{'t'}) { }
11 7 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
7 0 elsif ($Opts{'target_format'} eq 'latex') { }
983 6 2 if ($cmd) { }
1 1 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
1 0 elsif ($Opts{'target_format'} eq 'latex') { }
1004 29 29 unless $Process
1005 2 27 unless (defined $Scope{'format'})
1009 17 10 if (not $Scope{'format'} or $Scope{'format'} =~ /$Rx{'format'}/u)
1010 1 16 if ($BfMacro{'filter'}) { }
2 14 elsif ($BfMacro{'filter_tag'} and defined $Filters{$BfMacro{'filter_tag'}}{'code'}) { }
1033 78 78 unless $Process
1034 2 76 unless (@{$Scope{'Bl'};})
1040 10 66 unless ($Scope{'item'})
1041 0 10 if ($st->{'t'} eq 'desc') { }
2 8 elsif ($st->{'t'} eq 'enum' or $st->{'t'} eq 'item') { }
0 8 elsif ($State{'text'}) { }
1057 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') { }
1059 2 2 if ($Opts{'target_format'} eq 'latex')
1062 2 2 if $Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u
1092 6 70 @{$Scope{'Bl'};} ? :
1100 26 8 if ($Scope{'item'})
1105 26 8 if (defined $State{'_table_title'})
1106 8 18 if ($Opts{'target_format'} eq 'latex') { }
1121 30 44 unless $Process
1122 2 42 unless (@{$Scope{'Bm'};})
1131 10 32 if (defined $st->{'t'})
1132 2 8 if (defined $Xmtag{$st->{'t'}}{'end'})
1140 18 24 if (@Arg)
1144 1 41 if ($st->{'id'} and $Opts{'target_format'} eq 'latex')
1148 8 34 if (@Arg)
1149 2 6 if (not $State{'inline'}) { }
1153 0 6 $Flag{'ns'} ? :
1160 23 23 unless $Process
1169 2 21 unless (defined $opts{'f'})
1174 2 19 if (@{$Scope{'Bl'};} and not $Scope{'item'})
1179 10 9 if ($opts{'f'} =~ /$Rx{'format'}/u)
1180 6 4 if ($State{'text'})
1183 3 7 if (defined $opts{'filter'}) { }
1205 2 44 if (defined $opts{'f'} and not $opts{'f'} =~ /$Rx{'format'}/u)
1208 4 40 unless (@Arg)
1209 2 2 if $Process
1214 12 28 if ($opts{'as-is'}) { }
1215 6 6 unless $Process
1218 2 4 if $State{'wants_space'} and not $Flag{'ns'}
1220 2 4 if (defined $opts{'filter'}) { }
2 2 elsif (defined $opts{'t'}) { }
1225 0 2 unless (defined $Filters{$opts{'t'}})
1230 2 0 if (defined $Filters{$opts{'t'}}{'code'}) { }
0 0 elsif (defined $Filters{$opts{'t'}}{'shell'}) { }
1247 4 24 if ($file =~ /::/u) { }
0 24 elsif (not $file =~ m[[/\.]]u) { }
1248 0 4 if ($file =~ /\./u)
1258 0 0 unless -f $file
1260 0 28 unless (-f $file)
1263 9 19 unless ($FileParse{$file})
1264 0 9 unless open my $fh, '<', $file
1269 14 14 if ($Process) { }
1279 27 27 if ($Process) { }
1295 27 0 if (@Arg)
1299 8 19 if (@Arg >= 2)
1314 10 17 @Arg > 1 ? :
1321 19 8 if (@Arg == 1) { }
8 0 elsif (@Arg >= 2) { }
1334 2 6 if (@Arg > 2)
1337 2 6 if ($image =~ /[{}]/u or $label =~ /[{}]/u)
1348 3 3 if ($Opts{'target_format'} eq 'latex') { }
3 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
1361 0 3 if ($Opts{'target_format'} eq 'epub') { }
1375 0 3 if (defined $opts{'link'}) { }
1394 2 17 if ($image =~ /[\{\}]/u)
1401 6 11 if ($Opts{'target_format'} eq 'latex') { }
2 9 elsif ($Opts{'target_format'} eq 'epub') { }
9 0 elsif ($Opts{'target_format'} eq 'xhtml') { }
1419 1 8 if (defined $opts{'link'}) { }
1432 127 127 unless $Process
1434 2 125 unless (@{$Scope{'Bl'};})
1442 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') { }
1460 2 6 if ($Scope{'item'})
1464 0 8 unless (@Arg)
1473 30 30 if ($Scope{'item'})
1478 18 42 if (@Arg)
1479 0 18 $Flag{'ns'} ? :
1485 19 26 if ($Scope{'item'})
1491 30 15 unless ($Opts{'target_format'} eq 'latex')
1494 39 6 if (@Arg)
1495 0 39 $Flag{'ns'} ? :
1501 6 6 if (not $Scope{'paragraph'}) { }
6 0 elsif ($Scope{'item'}) { }
1510 8 4 if (@Arg)
1516 26 26 unless $Process
1523 2 24 unless (@Arg)
1530 0 24 if ($Param{'lang'} eq 'fr' and $close_delim =~ /^(?:!|:|\?|;)$/u)
1534 6 18 if (@Arg >= 2) { }
18 0 elsif (@Arg == 1) { }
1535 2 4 if (@Arg > 2)
1541 3 3 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
3 0 elsif ($Opts{'target_format'} eq 'latex') { }
1557 9 9 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
9 0 elsif ($Opts{'target_format'} eq 'latex') { }
1570 78 78 unless $Process
1571 20 58 if ($Scope{'paragraph'}) { }
37 21 elsif ($State{'text'}) { }
8 13 elsif ($Opts{'target_format'} eq 'latex') { }
1582 4 74 if ($State{'macro'} eq 'D') { }
17 57 elsif (@Arg) { }
1588 6 11 if ($Opts{'target_format'} eq 'latex') { }
11 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
1611 67 79 unless ($Process)
1612 9 58 if $opts{'id'}
1615 0 79 if ($opts{'id'} =~ /\s/u)
1619 47 32 @Arg > 1 ? :
1622 4 75 if (defined $opts{'t'} and not defined $Xmtag{$opts{'t'}})
1627 75 4 if (@Arg) { }
1638 22 53 if (defined $opts{'t'})
1643 4 18 if (defined $Xmtag{$opts{'t'}}{'begin'})
1646 4 18 if (defined $Xmtag{$opts{'t'}}{'end'})
1653 9 66 if ($opts{'id'})
1654 2 7 if ($Opts{'target_format'} eq 'latex')
1663 94 92 unless $Process
1674 14 78 @Arg > 1 ? :
1675 2 90 unless (@Arg)
1679 0 4 unless (defined $Self->{'loX'}{$opts{'t'}} or $opts{'id'})
1688 71 19 unless ($opts{'id'})
1690 2 69 unless (exists $Self->{'loX'}{$opts{'t'}}{$id})
1698 15 75 $opts{'name'} ? :
1700 23 67 if ($Opts{'target_format'} eq 'latex') { }
67 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
1701 3 20 if ($opts{'id'}) { }
19 1 elsif ($valid_title) { }
1702 0 3 unless ($ID{$id})
1717 16 51 if ($opts{'id'}) { }
50 1 elsif ($valid_title) { }
1718 0 16 if (not $ID{$id}) { }
1737 67 66 unless $Process
1738 3 63 unless (@{$Scope{'Bl'};})
1742 2 61 unless ($State{'under_table_scope'})
1746 2 59 unless ($Scope{'item'})
1758 51 8 if (@Arg)
1764 55 55 if ($Process) { }
1784 27 28 if $opts{'mini'}
1785 0 27 if $opts{'mini'} and $opts{'lof'}
1786 0 27 if $opts{'mini'} and $opts{'lot'}
1787 0 27 if $opts{'mini'} and $opts{'toc'}
1808 46 9 unless ($opts{'toc'} or $opts{'lof'} or $opts{'lot'})
1811 0 0 if ($opts{'toc'} and $opts{'lof'} or $opts{'toc'} and $opts{'lot'} or $opts{'lof'} and $opts{'lot'})
1821 15 40 if ($Opts{'target_format'} eq 'latex') { }
40 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
1822 3 12 if ($opts{'summary'}) { }
1828 6 9 if ($opts{'mini'}) { }
1829 0 6 if ($opts{'lof'}) { }
0 6 elsif ($opts{'lot'}) { }
1840 0 9 if ($opts{'lof'}) { }
2 7 elsif ($opts{'lot'}) { }
1852 0 40 if ($opts{'lof'}) { }
7 33 elsif ($opts{'lot'}) { }
1865 202 202 if $Process
1866 0 202 unless (@Arg)
1873 22 180 if ($cmd eq 'dtag') { }
3 177 elsif ($cmd eq 'ftag') { }
50 127 elsif ($cmd eq 'mtag') { }
127 0 elsif ($cmd eq 'set') { }
1897 2 20 unless (defined $opts{'f'})
1902 2 18 unless ($opts{'f'} =~ /$Rx{'valid_format'}/u)
1906 9 9 unless $opts{'f'} =~ /$Rx{'format'}/u
1907 1 8 unless (defined $opts{'t'})
1915 5 3 if (defined $opts{'c'})
1916 1 4 unless ($opts{'c'} =~ /^[a-zA-Z]*$/u)
1921 3 2 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u)
1926 2 1 unless $opts{'c'} eq '' or $HtmlContainingFlow{$opts{'c'}}
1942 0 3 if (defined $opts{'f'})
1943 0 0 unless ($opts{'f'} =~ /$Rx{'valid_format'}/u)
1947 0 0 unless $opts{'f'} =~ /$Rx{'format'}/u
1949 0 3 unless (defined $opts{'t'})
1953 0 0 if ($opts{'shell'} and $opts{'code'})
1959 3 0 if ($opts{'code'})
1979 4 46 unless (defined $opts{'f'})
1984 2 44 unless ($opts{'f'} =~ /$Rx{'valid_format'}/u)
1989 22 22 unless $opts{'f'} =~ /$Rx{'format'}/u
1991 3 19 unless (defined $opts{'t'})
1997 13 6 if (defined $opts{'c'} and $opts{'c'} =~ /^[a-zA-Z]*$/u)
1998 0 13 unless ($opts{'c'} =~ /^[a-zA-Z]*$/u)
2003 7 6 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u)
2008 1 6 unless $opts{'c'} eq '' or $HtmlPhrasing{$opts{'c'}}
2014 9 10 if (defined $opts{'b'})
2017 9 10 if (defined $opts{'e'})
2031 8 119 if (defined $opts{'f'})
2032 0 8 unless ($opts{'f'} =~ /$Rx{'valid_format'}/u)
2036 4 4 unless $opts{'f'} =~ /$Rx{'format'}/u
2038 2 121 unless (@Arg >= 2)
2042 2 119 if (@Arg > 2)
2047 4 117 unless ($AllowedParam{$parameter})
2054 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') { }
2070 0 1 unless $Param{$parameter} =~ /^(?:2|3)$/u
2073 9 0 if ($IndexTraductions{$Param{'lang'}})
2080 0 160 if ($Scope{'de'})
2081 0 0 if $Process
2093 0 160 unless (@Arg)
2094 0 0 if $Process
2099 0 160 if ($name =~ /^[A-Z][a-z]$/u or $name =~ /^#/u)
2111 72 88 if (defined $opts{'f'})
2112 0 72 unless ($opts{'f'} =~ /$Rx{'valid_format'}/u)
2113 0 0 if $Process
2117 36 36 unless ($opts{'f'} =~ /$Rx{'format'}/u)
2122 0 160 if (@Arg and $Process)
2133 0 16 unless (@Arg)
2137 0 16 if (defined $opts{'f'})
2138 0 0 unless ($opts{'f'} =~ /$Rx{'valid_format'}/u)
2143 0 0 unless $opts{'f'} =~ /$Rx{'format'}/u
2147 16 0 if (@arg) { }
2157 4 156 unless ($Scope{'de'})
2158 2 2 if $Process
2163 36 120 if ($DeMacro{'ignore'})
2167 60 60 if $DeMacro{'perl'}
2168 60 60 if ($DeMacro{'perl'})
2182 18 18 unless $Process
2183 2 16 unless (@Arg)
2188 6 10 unless ($AllowedFlag{$key})
2191 12 4 if (defined $value) { }
4 0 elsif (defined $Flag{$key}) { }
2192 0 12 if (defined $Flag{$key} and $value eq $Flag{$key})
2207 185 185 if ($Process) { }
2220 2 183 unless (@Arg)
2226 24 159 if ($macro eq 'Pt') { }
75 84 elsif ($macro eq 'Ch') { }
84 0 elsif ($macro eq 'Sh' or $macro eq 'Ss') { }
2235 54 30 if ($Opts{'all_in_one_file'}) { }
2247 2 181 if (exists $Self->{'loX'}{'toc'}{$title})
2262 99 84 if ($macro =~ /^(?:Pt|Ch)$/u)
2289 2 183 unless (@Arg)
2298 9 174 if $opts{'nonum'}
2307 99 84 if ($State{'macro'} =~ /^(?:Pt|Ch)$/u)
2309 30 69 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u and not $Opts{'all_in_one_file'})
2319 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) { }
2321 54 2 if ($numbered) { }
2349 120 63 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u and not $opts{'nonum'})
2351 120 0 if $num
2361 56 127 if ($Opts{'target_format'} eq 'latex') { }
127 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
2363 54 2 if ($numbered) { }
2384 0 54 if ($Count{'if_ignore'})
2393 8 46 unless (defined $opts{'f'} or @Arg)
2398 26 20 if (defined $opts{'f'})
2399 0 26 unless ($opts{'f'} =~ /$Rx{'valid_format'}/u)
2400 0 0 if $Process
2403 12 14 unless ($opts{'f'} =~ /$Rx{'format'}/u)
2409 24 10 if (@Arg)
2411 0 24 if (@Arg)
2412 0 0 if $Process
2415 6 18 unless ($bool)
2422 18 32 if $Count{'if_ignore'}
2423 46 4 if (@{$Scope{'#if'};}) { }
2427 2 2 if $Process
2437 94 86 unless ($perl)
2439 18 76 unless (@$parse)
2445 38 52 if (@$block == 2) { }
52 0 elsif (@$block == 3) { }
2448 20 4 defined $Arg[$1 - 1] ? :
2456 24 0 defined $Arg[$1 - 1] ? :
2459 0 0 defined $Arg[$1 - 1] ? :
2466 0 202 if /\\+\$\d/u
2469 4 86 if $remaining
2478 154 8 if ($UserMacroCall{'depth'} == 0)
2484 86 76 if ($perl) { }
2490 38 38 if ($Process) { }
2498 154 8 if ($UserMacroCall{'depth'} == 0)
2510 8 3 if ($Flag{'fr-nbsp-auto'})
2519 2 1016 $Flag{'ns'} ? :
2528 11 1 if ($Process) { }
2538 90 344 if ($Scope{'paragraph'}) { }
124 220 elsif ($State{'text'}) { }
2552 2 8 if (defined $st->{'t'})
2563 6 1173 if (test_for_unclosed_block($type))
2567 4 2 if ($type eq 'Bm') { }
0 2 elsif ($type eq 'Bl') { }
2 0 elsif ($type eq 'Bd') { }
2581 6 143 if (defined $UserMacroCall{'lnum'}) { }
143 0 elsif (defined $State{'lnum'}) { }
0 0 elsif ($File) { }
2597 0 120 if $Flag{'_no_warnings'}
2601 0 120 if ($Opts{'use_carp'}) { }
2614 0 0 if ($Opts{'use_carp'}) { }
2624 0 29 if $Flag{'_no_warnings'}
2628 0 29 if ($Opts{'use_carp'}) { }
2640 4 410 unless ($elt)
2643 346 64 if (defined $opts) { }
2644 0 346 unless ref $opts eq 'HASH'
2651 157 253 if ($Opts{'target_format'} eq 'latex') { }
253 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
2652 40 117 $opts->{'env'} ? :
2656 146 107 if ($opts->{'class'})
2659 137 116 if ($opts->{'id'})
2668 4 410 unless ($elt)
2671 84 326 if (defined $opts) { }
2672 0 84 unless ref $opts eq 'HASH'
2678 157 253 if ($Opts{'target_format'} eq 'latex') { }
253 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
2679 40 117 $opts->{'env'} ? :
2687 22 29 if ($State{'text'})
2719 11 1861 if ($Param{'lang'} eq 'fr' and not $Flag{'_verbatim'})
2723 692 1180 if ($Opts{'target_format'} eq 'latex') { }
1180 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
2735 79 100 if $Opts{'target_format'} eq 'latex'
2756 33 80 if (@Arg and $Arg[$#Arg] =~ /^(?:\\~)?\p{Punct}+$/u and not $Arg[$#Arg] =~ /^\\&/u)
2761 0 33 if ($Param{'lang'} eq 'fr')
2770 32 735 if $State{'wanted_space'}
2780 87 0 unless ($Scope{'paragraph'})
2790 87 188 if ($Opts{'target_format'} eq 'latex' and not $last)
2799 48 318 if ($macro eq 'Pt') { }
150 168 elsif ($macro eq 'Ch') { }
112 56 elsif ($macro eq 'Sh') { }
56 0 elsif ($macro eq 'Ss') { }
2801 48 0 unless $nonum
2809 146 4 unless $nonum
2817 98 14 unless $nonum
2823 56 0 unless $nonum
2831 341 94 if ($InfosFlag{'has_part'}) { }
86 8 elsif ($InfosFlag{'has_chapter'}) { }
2838 137 74 $header_macro eq 'Sh' ? :
160 211 $header_macro eq 'Ch' ? :
64 371 $header_macro eq 'Pt' ? :
2846 9 174 if $nonum
2849 24 150 if ($macro eq 'Pt') { }
73 77 elsif ($macro eq 'Ch') { }
49 28 elsif ($macro eq 'Sh') { }
28 0 elsif ($macro eq 'Ss') { }
2856 43 6 if ($InfosFlag{'has_chapter'}) { }
2864 26 2 if ($InfosFlag{'has_chapter'}) { }
2 0 elsif ($Count{'numbered_section'}) { }
2879 27 33 if ($Opts{'target_format'} eq 'latex') { }
33 0 elsif ($Opts{'target_format'} eq 'xhtml' or $Opts{'target_format'} eq 'epub') { }
2936 3 57 if ($Opts{'target_format'} eq 'epub')
2957 1 59 defined $Opts{'filters'} ? :
3010 2 118 defined $Opts{'user_macros'} ? :
3020 20 2 if (defined $repl) { }
3041 6 40 unless (defined $loXstack{$class})
3057 225 53 if (not $Flag{'ns'} || $ns and $State{'wants_space'} || $State{'text'})
3058 16 209 $State{'inline'} ? :
3069 87 244 if (not $Scope{'paragraph'} || $Scope{'item'} || $State{'inline'}) { }
3099 1144 987 unless $flag =~ s/^-//u
3102 4 983 unless ($spec->{$flag})
3107 724 259 if ($spec->{$flag} eq 's') { }
259 0 elsif ($spec->{$flag} eq 'b') { }
3110 4 720 unless (@Arg)
3117 720 0 if (defined $arg and not $arg =~ /^-/u)
3133 1621 0 if ($text =~ s/^(\S+)//u) { }
3160 0 33 unless (-f $file)
3164 0 33 unless open my $fh, '<', $file
3182 0 6 if ($?) { }
3198 0 283 unless open STDOUT, '>', \$title_render
3204 28 439 if ($word =~ /^(?:Bm|Em|Sm)$/u) { }
3214 4 307 unless @$args
3215 28 279 if ($args->[0] =~ /^(?:Bm|Em|Sm)$/u) { }
3239 2 8 if (defined $st->{'t'})
3273 0 206 unless defined $Scope{$type}
3283 4 202 $UserMacroCall{'depth'} > 0 ? :
4 202 $UserMacroCall{'depth'} > 0 ? :
4 202 $UserMacroCall{'depth'} > 0 ? :
3291 0 0 if (-f $fpath)
3301 0 4 unless open my $fh, '<', $file
3312 8 1231 if (@$stack)
3316 8 0 $File eq $st->{'file'} ? :
3318 0 8 $st->{'in_user_macro'} ? :
3319 0 8 $st->{'t'} ? :
3322 2 6 if $macro ne 'End Of File'
3325 8 0 !$State{'inline'} ? :
3335 2 58 if ($Scope{'de'})
3343 2 1585 if ($Scope{'format'})
3346 2 0 $File eq $BfMacro{'begin_file'} ? :
3349 0 2 $BfMacro{'in_macro'} ? :
3360 2 1554 if (not $macro =~ /^Ef$/u and test_for_unclosed_format_block()) { }
1 1553 elsif ($Flag{'_verbatim'} and not $macro =~ /^Ef|Ed$/u) { }
2 1569 elsif (@{$Scope{'Bl'};} and $Scope{'Bl'}[0]{'t'} ne 'verse' and not $AllowedInBl{$macro}) { }
3386 3 0 unless (-d $images_dir)
3389 2 1 if @Image or defined $Param{'epub-cover'}
3393 1 4 unless $image
3395 0 4 unless (-f $image)
3398 0 4 unless (-f $image)
3402 2 2 if -f $new_image
3403 0 2 unless copy($image, $new_image)
3409 0 3 unless ($Param{'document-title'})
3421 2 1 if $cover
3427 1 2 if ($Param{'epub-version'} =~ /^3/u)
3435 2 1 if ($cover)
3444 0 3 unless open my $fh, '>', $container_xml
3465 0 3 unless open STDOUT, '>', $content_opf
3472 3 0 if (defined $Param{'epub-uuid'})
3476 0 3 unless (defined $Param{'epub-uuid'})
3480 0 0 if ($@) { }
3493 1 2 if $Param{'epub-version'} =~ /^3/u
3496 2 1 if $Param{'epub-version'} =~ /^2/u
3510 1 2 if ($Param{'epub-version'} =~ /^3/u)
3513 1 0 if ($deterministic) { }
3519 1 0 if $Param{'epub-version'} =~ /^3/u
3523 2 1 if ($Param{'epub-subject'})
3528 2 1 if ($Param{'document-author'})
3533 1 2 if $cover and not !($Param{'epub-version'} =~ /^3/u)
3536 2 1 if ($Param{'epub-metadata'})
3543 1 2 if $Param{'epub-version'} =~ /^3/u
3555 2 1 if ($cover)
3562 1 2 if $cover and $Param{'epub-version'} =~ /^3/u
3565 2 1 if $cover
3568 2 1 if $cover
3578 15 15 unless $_->{'macro'} =~ /^(?:Pt|Ch)$/u
3592 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) { }
3619 2 1 if $cover
3626 15 15 unless $_->{'macro'} =~ /^(?:Pt|Ch)$/u
3632 1 2 if $Param{'epub-version'} =~ /^3/u
3639 2 1 if $cover
3654 0 2 unless open STDOUT, '>', $cover_xhtml
3675 2 1 if ($Param{'epub-css'})
3676 0 2 unless (-f $Param{'epub-css'})
3679 0 2 unless open my $fh, '<', "$Param{'epub-css'}"
3686 0 3 unless open my $fh, '>', $stylesheet_css
3697 0 3 unless open my $fh, '>', $mimetype_path
3707 0 1 unless open STDOUT, '>', $nav_xhtml
3717 1 0 if $title
3729 0 1 if $Param{'epub-nav-landmarks'}
3741 0 3 unless open STDOUT, '>', $toc_ncx
3755 3 0 if $title
3774 1 1 if ($Param{'latex-preamble'}) { }
3778 1 0 if ($InfosFlag{'has_chapter'} or $InfosFlag{'has_part'}) { }
3793 0 1 if $InfosFlag{'use_minitoc'}
3796 0 1 if $InfosFlag{'use_verse'}
3799 0 1 if $InfosFlag{'use_graphicx'}
3814 0 2 if $InfosFlag{'dominilof'}
3815 0 2 if $InfosFlag{'dominilot'}
3816 0 2 if $InfosFlag{'dominitoc'}
3818 1 1 if $Param{'title-page'}
3837 10 0 $macro eq 'Pt' ? :
16 10 $macro eq 'Ss' ? :
33 26 $macro eq 'Sh' ? :
55 59 $macro eq 'Ch' ? :
3841 14 27 if ($Opts{'target_format'} eq 'epub' and $Param{'epub-version'} =~ /^3/u or $Opts{'target_format'} eq 'xhtml' and $Param{'xhtml5'}) { }
3857 7 34 if ($Opts{'target_format'} eq 'epub' and $Param{'epub-version'} =~ /^3/u) { }
3875 39 0 if $title
3878 0 39 if $Param{'favicon'}
3881 12 27 if ($Param{'epub-css'} and $Opts{'target_format'} eq 'epub') { }
14 26 elsif ($Param{'xhtml-css'} and $Opts{'target_format'} eq 'xhtml') { }
3895 14 7 if ($Opts{'target_format'} ne 'epub' and $Param{'xhtml-top'})
3901 14 7 if ($Opts{'target_format'} ne 'epub' and $Param{'xhtml-bottom'})
3913 12 3 if ($Opts{'target_format'} ne 'epub' and $State{'_xhtml_navigation_text'})
3919 15 15 if ($Opts{'target_format'} eq 'epub') { }
3929 0 30 unless open STDOUT, '>', $out_file
3932 15 15 if $Opts{'target_format'} eq 'epub'
3938 12 3 unless $State{'nav_count'} <= 1
3940 12 3 unless $State{'nav_count'} >= @{$loXstack{'nav'};}
3946 12 3 if (defined $previous) { }
3960 12 3 if (defined $next) { }
3984 0 11 unless defined $loXstack{$class} and @{$loXstack{$class};}
3998 168 80 if ($Opts{'all_in_one_file'}) { }
30 50 elsif ($hasfile) { }
4002 15 15 $Opts{'target_format'} eq 'epub' ? :
4006 21 29 $Opts{'target_format'} eq 'epub' ? :
4009 42 8 $Count{'part'} || $Count{'chapter'} ? :
4029 6 3 if ($Param{'title-page'})
4032 0 6 unless $Param{'document-title'}
4035 0 6 unless $Param{'document-date'}
4039 0 6 unless $Param{'document-author'}
4040 6 0 if $Param{'document-title'}
4043 6 0 if $Param{'document-author'}
4046 6 0 if $Param{'document-date'}
4057 0 40 unless @{$loXstack{'toc'};}
4063 20 1 if ($opts->{'mini'} and $State{'nav_count'})
4069 1 36 $type eq 'nav' ? :
3 37 $type eq 'ncx' ? :
4073 1 0 $type eq 'nav' ? :
36 1 $type eq 'xhtml' ? :
3 37 $type eq 'ncx' ? :
4080 3 37 if ($type eq 'ncx') { }
36 1 elsif ($type eq 'xhtml') { }
1 0 elsif ($type eq 'nav') { }
4093 28 8 if ($opts->{'mini'} or defined $opts->{'title'}) { }
4099 16 20 if $title
4106 1 0 if $Param{'document-title'}
4121 86 174 if ($opts->{'mini'})
4122 14 72 if $macro eq $mini_macro or $macro eq 'Pt'
4124 110 136 if ($opts->{'summary'})
4125 0 110 if ($opts->{'mini'} and $mini_macro eq 'Ch') { }
4126 0 0 unless $macro eq 'Sh'
4129 65 45 unless $macro =~ /^(?:Pt|Ch)$/u
4135 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) { }
4141 53 22 if ($type eq 'xhtml') { }
6 16 elsif ($type eq 'nav') { }
4152 5 31 if $diference + $level < 1
4159 0 36 if $level < 1
4166 30 151 if ($type eq 'ncx') { }
140 11 elsif ($type eq 'xhtml') { }
11 0 elsif ($type eq 'nav') { }
4168 28 2 if $num
4181 10 1 if $num
4186 40 0 if $level > 0
4192 3 37 if ($type eq 'ncx') { }
36 1 elsif ($type eq 'xhtml') { }
1 0 elsif ($type eq 'nav') { }
4209 118 2 unless ($opts->{'nonum'} or $href =~ /^index/u and not $Opts{'all_in_one_file'})
4212 92 26 if ($opts->{'toc'}) { }
4214 90 2 if $num
4220 76 90 if ($Opts{'all_in_one_file'}) { }