X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/7db73ab9c0171b7c9afd02e205d09b83ce1a2b64..18ff65229f85952af3cc3f0646ee55e6a2dcd00a:/sample.plp diff --git a/sample.plp b/sample.plp index b4d2c44..12460ec 100644 --- a/sample.plp +++ b/sample.plp @@ -1,12 +1,15 @@ <(common.inc.plp)><: -my $textinc = 'data/unicode-sampler/unicode.txt'; +my $textinc = 'sample.txt'; +my $proto = sprintf('http%s://', !!$ENV{HTTPS} && 's'); +my $preview = "$proto$ENV{HTTP_HOST}/sample.png"; Html({ title => "unicode sampler", - version => '2.0', + version => '2.1', stylesheet => [qw'light dark mono red'], data => [$textinc], + raw => qq(), }); open my $source, '<', $textinc @@ -16,8 +19,12 @@ local $/ = "\n\n"; my $top = readline $source; my ($title, $hr, $intro) = split /\n(\pP)\1+\n/, $top, 2; say "

$title

"; -printf '

HTML display of plain text', $textinc; -say ' intended for monospaced (terminal) output.

'; +say <<"."; +

HTML display of plain text +intended for monospaced (terminal) output. +Compare an expected rendering of the overview. +

+. say '
';
 print $intro;
@@ -25,6 +32,10 @@ print $intro;
 while (my $p = readline $source) {
 	EscapeHTML($p);
 	$p =~ s{ \A ((\pL+) \N*:) \n }{

$1

}x; + if ($2 eq 'Unicode') { + # table without proper direction control + $p =~ s/^(?= )/\x{202d}/gm; # ltr override every line + } $p =~ s{(?<=^ )([\p{Latin} ]+:)}{$1}gm; print $p; }