X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/f4ca24ee41993be5098b4ba675561537803c272a..a75fd4a977d0c23f72a3cd4e8ca38eeb31d4cb17:/sample.plp diff --git a/sample.plp b/sample.plp index be68403..adae7bd 100644 --- a/sample.plp +++ b/sample.plp @@ -1,12 +1,15 @@ <(common.inc.plp)><: my $textinc = 'data/unicode-sampler/unicode.txt'; +my $proto = sprintf('http%s://', !!$ENV{HTTPS} && 's'); +my $preview = "$proto$ENV{HTTP_HOST}/sample.png"; Html({ title => "unicode sampler", version => '2.0', stylesheet => [qw'light dark mono red'], data => [$textinc], + raw => qq(), }); open my $source, '<', $textinc @@ -14,15 +17,18 @@ open my $source, '<', $textinc local $/ = "\n\n"; my $top = readline $source; -my ($title, $hr, $intro) = split /\n(\H)$1+\n/, $top, 2; +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 '
';
 print $intro;
 
 while (my $p = readline $source) {
 	EscapeHTML($p);
-	$p =~ s{ \A ((\pL+) \N*:) \n\Z }{

$1

}x; + $p =~ s{ \A ((\pL+) \N*:) \n }{

$1

}x; + $p =~ s{(?<=^ )([\p{Latin} ]+:)}{$1}gm; print $p; }