3 my $textinc = 'sample.txt';
6 title => "unicode sampler",
8 stylesheet => [qw'light dark mono red'],
10 image => 'sample.png',
13 open my $source, '<', $textinc
14 or Abort("Could not open text at $textinc", 501, $!);
17 my $top = readline $source;
18 my ($title, $hr, $intro) = split /\n(\pP)\1+\n/, $top, 2;
19 say "<h1>$title</h1>";
21 <p>HTML display of <a href="/$textinc">plain text</a>
22 intended for monospaced (terminal) output.
23 Compare an expected rendering of the <a href="/sample.png">overview</a>.
30 while (my $p = readline $source) {
32 $p =~ s{ \A ((\pL+) \N*:) \n }{<h2 id="\L$2\E">$1</h2>}x;
33 if ($2 eq 'Unicode') {
34 # table without proper direction control
35 $p =~ s/^(?= )/\x{202d}/gm; # ltr override every line
37 $p =~ s{(?<=^ )([\p{Latin} ]+:)}{<em>$1</em>}gm;