Branch Coverage

lib/Text/Frundis/Processing.pm
Criterion Covered Total %
branch 1052 1304 80.6


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'} ? :
578 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)
2287 2 183 unless (@Arg)
2305 99 84 if ($State{'macro'} =~ /^(?:Pt|Ch)$/u)
2307 30 69 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u and not $Opts{'all_in_one_file'})
2317 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) { }
2319 54 2 if ($numbered) { }
2347 120 63 if ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u and not $opts{'nonum'})
2349 120 0 if $num
2359 56 127 if ($Opts{'target_format'} eq 'latex') { }
127 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
2361 54 2 if ($numbered) { }
2382 0 54 if ($Count{'if_ignore'})
2391 8 46 unless (defined $opts{'f'} or @Arg)
2396 26 20 if (defined $opts{'f'})
2397 0 26 unless ($opts{'f'} =~ /$Rx{'valid_format'}/u)
2398 0 0 if $Process
2401 12 14 unless ($opts{'f'} =~ /$Rx{'format'}/u)
2407 24 10 if (@Arg)
2409 0 24 if (@Arg)
2410 0 0 if $Process
2413 6 18 unless ($bool)
2420 18 32 if $Count{'if_ignore'}
2421 46 4 if (@{$Scope{'#if'};}) { }
2425 2 2 if $Process
2435 94 86 unless ($perl)
2437 18 76 unless (@$parse)
2443 38 52 if (@$block == 2) { }
52 0 elsif (@$block == 3) { }
2446 20 4 defined $Arg[$1 - 1] ? :
2454 24 0 defined $Arg[$1 - 1] ? :
2457 0 0 defined $Arg[$1 - 1] ? :
2464 0 202 if /\\+\$\d/u
2467 4 86 if $remaining
2476 154 8 if ($UserMacroCall{'depth'} == 0)
2482 86 76 if ($perl) { }
2488 38 38 if ($Process) { }
2496 154 8 if ($UserMacroCall{'depth'} == 0)
2508 8 3 if ($Flag{'fr-nbsp-auto'})
2517 2 1016 $Flag{'ns'} ? :
2526 11 1 if ($Process) { }
2536 90 344 if ($Scope{'paragraph'}) { }
124 220 elsif ($State{'text'}) { }
2551 2 8 if (defined $st->{'t'})
2562 6 1173 if (test_for_unclosed_block($type))
2566 4 2 if ($type eq 'Bm') { }
0 2 elsif ($type eq 'Bl') { }
2 0 elsif ($type eq 'Bd') { }
2580 6 143 if (defined $UserMacroCall{'lnum'}) { }
143 0 elsif (defined $State{'lnum'}) { }
0 0 elsif ($File) { }
2596 0 120 if $Flag{'_no_warnings'}
2600 0 120 if ($Opts{'use_carp'}) { }
2613 0 0 if ($Opts{'use_carp'}) { }
2623 0 29 if $Flag{'_no_warnings'}
2627 0 29 if ($Opts{'use_carp'}) { }
2639 4 410 unless ($elt)
2642 346 64 if (defined $opts) { }
2643 0 346 unless ref $opts eq 'HASH'
2650 157 253 if ($Opts{'target_format'} eq 'latex') { }
253 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
2651 40 117 $opts->{'env'} ? :
2655 146 107 if ($opts->{'class'})
2658 137 116 if ($opts->{'id'})
2667 4 410 unless ($elt)
2670 84 326 if (defined $opts) { }
2671 0 84 unless ref $opts eq 'HASH'
2677 157 253 if ($Opts{'target_format'} eq 'latex') { }
253 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
2678 40 117 $opts->{'env'} ? :
2686 22 29 if ($State{'text'})
2718 11 1861 if ($Param{'lang'} eq 'fr' and not $Flag{'_verbatim'})
2722 692 1180 if ($Opts{'target_format'} eq 'latex') { }
1180 0 elsif ($Opts{'target_format'} =~ /$Rx{'xhtml_or_epub'}/u) { }
2734 79 100 if $Opts{'target_format'} eq 'latex'
2755 33 80 if (@Arg and $Arg[$#Arg] =~ /^(?:\\~)?\p{Punct}+$/u and not $Arg[$#Arg] =~ /^\\&/u)
2760 0 33 if ($Param{'lang'} eq 'fr')
2769 32 735 if $State{'wanted_space'}
2779 87 0 unless ($Scope{'paragraph'})
2789 87 188 if ($Opts{'target_format'} eq 'latex' and not $last)
2798 48 318 if ($macro eq 'Pt') { }
150 168 elsif ($macro eq 'Ch') { }
112 56 elsif ($macro eq 'Sh') { }
56 0 elsif ($macro eq 'Ss') { }
2800 48 0 unless $nonum
2808 146 4 unless $nonum
2816 98 14 unless $nonum
2822 56 0 unless $nonum
2830 341 94 if ($InfosFlag{'has_part'}) { }
86 8 elsif ($InfosFlag{'has_chapter'}) { }
2837 137 74 $header_macro eq 'Sh' ? :
160 211 $header_macro eq 'Ch' ? :
64 371 $header_macro eq 'Pt' ? :
2845 9 174 if $nonum
2848 24 150 if ($macro eq 'Pt') { }
73 77 elsif ($macro eq 'Ch') { }
49 28 elsif ($macro eq 'Sh') { }
28 0 elsif ($macro eq 'Ss') { }
2855 43 6 if ($InfosFlag{'has_chapter'}) { }
2863 26 2 if ($InfosFlag{'has_chapter'}) { }
2 0 elsif ($Count{'numbered_section'}) { }
2878 27 33 if ($Opts{'target_format'} eq 'latex') { }
33 0 elsif ($Opts{'target_format'} eq 'xhtml' or $Opts{'target_format'} eq 'epub') { }
2935 3 57 if ($Opts{'target_format'} eq 'epub')
2956 1 59 defined $Opts{'filters'} ? :
3009 2 118 defined $Opts{'user_macros'} ? :
3019 20 2 if (defined $repl) { }
3040 6 40 unless (defined $loXstack{$class})
3056 225 53 if (not $Flag{'ns'} || $ns and $State{'wants_space'} || $State{'text'})
3057 16 209 $State{'inline'} ? :
3068 87 244 if (not $Scope{'paragraph'} || $Scope{'item'} || $State{'inline'}) { }
3098 1144 987 unless $flag =~ s/^-//u
3101 4 983 unless ($spec->{$flag})
3106 724 259 if ($spec->{$flag} eq 's') { }
259 0 elsif ($spec->{$flag} eq 'b') { }
3109 4 720 unless (@Arg)
3116 720 0 if (defined $arg and not $arg =~ /^-/u)
3132 1621 0 if ($text =~ s/^(\S+)//u) { }
3159 0 33 unless (-f $file)
3163 0 33 unless open my $fh, '<', $file
3181 0 6 if ($?) { }
3197 0 283 unless open STDOUT, '>', \$title_render
3203 28 439 if ($word =~ /^(?:Bm|Em|Sm)$/u) { }
3213 4 307 unless @$args
3214 28 279 if ($args->[0] =~ /^(?:Bm|Em|Sm)$/u) { }
3238 2 8 if (defined $st->{'t'})
3272 0 206 unless defined $Scope{$type}
3282 4 202 $UserMacroCall{'depth'} > 0 ? :
4 202 $UserMacroCall{'depth'} > 0 ? :
4 202 $UserMacroCall{'depth'} > 0 ? :
3290 0 0 if (-f $fpath)
3300 0 4 unless open my $fh, '<', $file
3311 8 1231 if (@$stack)
3315 8 0 $File eq $st->{'file'} ? :
3317 0 8 $st->{'in_user_macro'} ? :
3318 0 8 $st->{'t'} ? :
3321 2 6 if $macro ne 'End Of File'
3324 8 0 !$State{'inline'} ? :
3334 2 58 if ($Scope{'de'})
3342 2 1585 if ($Scope{'format'})
3345 2 0 $File eq $BfMacro{'begin_file'} ? :
3348 0 2 $BfMacro{'in_macro'} ? :
3359 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}) { }
3385 3 0 unless (-d $images_dir)
3388 2 1 if @Image or defined $Param{'epub-cover'}
3392 1 4 unless $image
3394 0 4 unless (-f $image)
3397 0 4 unless (-f $image)
3401 2 2 if -f $new_image
3402 0 2 unless copy($image, $new_image)
3408 0 3 unless ($Param{'document-title'})
3420 2 1 if $cover
3426 1 2 if ($Param{'epub-version'} =~ /^3/u)
3434 2 1 if ($cover)
3443 0 3 unless open my $fh, '>', $container_xml
3464 0 3 unless open STDOUT, '>', $content_opf
3471 3 0 if (defined $Param{'epub-uuid'})
3475 0 3 unless (defined $Param{'epub-uuid'})
3479 0 0 if ($@) { }
3492 1 2 if $Param{'epub-version'} =~ /^3/u
3495 2 1 if $Param{'epub-version'} =~ /^2/u
3509 1 2 if ($Param{'epub-version'} =~ /^3/u)
3512 1 0 if ($deterministic) { }
3518 1 0 if $Param{'epub-version'} =~ /^3/u
3522 2 1 if ($Param{'epub-subject'})
3527 2 1 if ($Param{'document-author'})
3532 1 2 if $cover and not !($Param{'epub-version'} =~ /^3/u)
3535 2 1 if ($Param{'epub-metadata'})
3542 1 2 if $Param{'epub-version'} =~ /^3/u
3554 2 1 if ($cover)
3561 1 2 if $cover and $Param{'epub-version'} =~ /^3/u
3564 2 1 if $cover
3567 2 1 if $cover
3577 15 15 unless $_->{'macro'} =~ /^(?:Pt|Ch)$/u
3591 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) { }
3618 2 1 if $cover
3625 15 15 unless $_->{'macro'} =~ /^(?:Pt|Ch)$/u
3631 1 2 if $Param{'epub-version'} =~ /^3/u
3638 2 1 if $cover
3653 0 2 unless open STDOUT, '>', $cover_xhtml
3674 2 1 if ($Param{'epub-css'})
3675 0 2 unless (-f $Param{'epub-css'})
3678 0 2 unless open my $fh, '<', "$Param{'epub-css'}"
3685 0 3 unless open my $fh, '>', $stylesheet_css
3696 0 3 unless open my $fh, '>', $mimetype_path
3706 0 1 unless open STDOUT, '>', $nav_xhtml
3716 1 0 if $title
3728 0 1 if $Param{'epub-nav-landmarks'}
3740 0 3 unless open STDOUT, '>', $toc_ncx
3754 3 0 if $title
3773 1 1 if ($Param{'latex-preamble'}) { }
3777 1 0 if ($InfosFlag{'has_chapter'} or $InfosFlag{'has_part'}) { }
3792 0 1 if $InfosFlag{'use_minitoc'}
3795 0 1 if $InfosFlag{'use_verse'}
3798 0 1 if $InfosFlag{'use_graphicx'}
3813 0 2 if $InfosFlag{'dominilof'}
3814 0 2 if $InfosFlag{'dominilot'}
3815 0 2 if $InfosFlag{'dominitoc'}
3817 1 1 if $Param{'title-page'}
3836 10 0 $macro eq 'Pt' ? :
16 10 $macro eq 'Ss' ? :
33 26 $macro eq 'Sh' ? :
55 59 $macro eq 'Ch' ? :
3840 14 27 if ($Opts{'target_format'} eq 'epub' and $Param{'epub-version'} =~ /^3/u or $Opts{'target_format'} eq 'xhtml' and $Param{'xhtml5'}) { }
3856 7 34 if ($Opts{'target_format'} eq 'epub' and $Param{'epub-version'} =~ /^3/u) { }
3874 39 0 if $title
3877 0 39 if $Param{'favicon'}
3880 12 27 if ($Param{'epub-css'} and $Opts{'target_format'} eq 'epub') { }
14 26 elsif ($Param{'xhtml-css'} and $Opts{'target_format'} eq 'xhtml') { }
3894 14 7 if ($Opts{'target_format'} ne 'epub' and $Param{'xhtml-top'})
3900 14 7 if ($Opts{'target_format'} ne 'epub' and $Param{'xhtml-bottom'})
3912 12 3 if ($Opts{'target_format'} ne 'epub' and $State{'_xhtml_navigation_text'})
3918 15 15 if ($Opts{'target_format'} eq 'epub') { }
3928 0 30 unless open STDOUT, '>', $out_file
3931 15 15 if $Opts{'target_format'} eq 'epub'
3937 12 3 unless $State{'nav_count'} <= 1
3939 12 3 unless $State{'nav_count'} >= @{$loXstack{'nav'};}
3945 12 3 if (defined $previous) { }
3959 12 3 if (defined $next) { }
3983 0 11 unless defined $loXstack{$class} and @{$loXstack{$class};}
3997 168 80 if ($Opts{'all_in_one_file'}) { }
30 50 elsif ($hasfile) { }
4001 15 15 $Opts{'target_format'} eq 'epub' ? :
4005 21 29 $Opts{'target_format'} eq 'epub' ? :
4008 42 8 $Count{'part'} || $Count{'chapter'} ? :
4028 6 3 if ($Param{'title-page'})
4031 0 6 unless $Param{'document-title'}
4034 0 6 unless $Param{'document-date'}
4038 0 6 unless $Param{'document-author'}
4039 6 0 if $Param{'document-title'}
4042 6 0 if $Param{'document-author'}
4045 6 0 if $Param{'document-date'}
4056 0 40 unless @{$loXstack{'toc'};}
4062 20 1 if ($opts->{'mini'} and $State{'nav_count'})
4068 1 36 $type eq 'nav' ? :
3 37 $type eq 'ncx' ? :
4072 1 0 $type eq 'nav' ? :
36 1 $type eq 'xhtml' ? :
3 37 $type eq 'ncx' ? :
4079 3 37 if ($type eq 'ncx') { }
36 1 elsif ($type eq 'xhtml') { }
1 0 elsif ($type eq 'nav') { }
4092 28 8 if ($opts->{'mini'} or defined $opts->{'title'}) { }
4098 16 20 if $title
4105 1 0 if $Param{'document-title'}
4120 86 174 if ($opts->{'mini'})
4121 14 72 if $macro eq $mini_macro or $macro eq 'Pt'
4123 110 136 if ($opts->{'summary'})
4124 0 110 if ($opts->{'mini'} and $mini_macro eq 'Ch') { }
4125 0 0 unless $macro eq 'Sh'
4128 65 45 unless $macro =~ /^(?:Pt|Ch)$/u
4134 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) { }
4140 53 22 if ($type eq 'xhtml') { }
6 16 elsif ($type eq 'nav') { }
4151 5 31 if $diference + $level < 1
4158 0 36 if $level < 1
4165 30 151 if ($type eq 'ncx') { }
140 11 elsif ($type eq 'xhtml') { }
11 0 elsif ($type eq 'nav') { }
4167 28 2 if $num
4180 10 1 if $num
4185 40 0 if $level > 0
4191 3 37 if ($type eq 'ncx') { }
36 1 elsif ($type eq 'xhtml') { }
1 0 elsif ($type eq 'nav') { }
4208 118 2 unless ($opts->{'nonum'} or $href =~ /^index/u and not $Opts{'all_in_one_file'})
4211 92 26 if ($opts->{'toc'}) { }
4213 90 2 if $num
4219 76 90 if ($Opts{'all_in_one_file'}) { }