<(common.inc.plp)><:
+my $textinc = 'data/unicode-sampler/unicode.txt';
+
Html({
title => "unicode sampler",
version => '2.0',
stylesheet => [qw'light dark mono red'],
+ data => $textinc,
});
-open my $source, '<', 'data/unicode-sampler/unicode.txt'
- or die "Could not open text: $!\n";
+open my $source, '<', $textinc
+ or die "Could not open text at $textinc: $!\n";
+local $/ = "\n\n";
-my $title = readline $source;
-my $hr = readline $source;
+my $top = readline $source;
+my ($title, $hr, $intro) = split /\n(\H)$1+\n/, $top, 2;
say "<h1>$title</h1>";
say '<pre>';
+print $intro;
+
while (my $p = readline $source) {
- print EscapeHTML($p);
+ EscapeHTML($p);
+ $p =~ s{ \A (\N+:) \n\Z }{<h2>$1</h2>}x;
+ print $p;
}
+
say "</pre>\n";