Skip to content

Commit

Permalink
Avoid experimental smartmatch
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Dec 12, 2014
1 parent 6a80105 commit b581d6b
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions docs/build-html.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@

my $pandoc_cmd = {
normal => 'pandoc -s --toc --css=styles.css -H _head-inc -B _nav-header -A _nav-footer -o %s %s',
appendixAG => 'pandoc -s --css=styles.css -H _head-inc -B _nav-header -A _nav-footer -o %s %s',
index => 'pandoc -s --css=styles.css -H _head-inc -o %s %s', # -N
'appendix-a-index.txt' => 'pandoc -s --css=styles.css -H _head-inc -B _nav-header -A _nav-footer -o %s %s',
'appendix-g-glossary.txt' => 'pandoc -s --css=styles.css -H _head-inc -B _nav-header -A _nav-footer -o %s %s',
'index.txt' => 'pandoc -s --css=styles.css -H _head-inc -o %s %s', # -N
};

for my $txt_file (<*.txt>) {
my $html_file = substr($txt_file,0,-3) . 'html';
my $cmd;
if ($txt_file eq 'index.txt') {
$cmd = $pandoc_cmd->{'index'};
} elsif ($txt_file ~~ [qw(appendix-a-index.txt appendix-g-glossary.txt)]) {
$cmd = $pandoc_cmd->{'appendixAG'};
} else { $cmd = $pandoc_cmd->{'normal'}; }
my $cmd = $pandoc_cmd->{ $txt_file } // $pandoc_cmd->{normal};
#print "Processing:", $txt_file, '-->', $html_file
system sprintf $cmd, "$prefix/$html_file", $txt_file;
}

0 comments on commit b581d6b

Please sign in to comment.