X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/0a14ea8590ebb5b676a97b432484c6df47c435f0..7db73ab9c0171b7c9afd02e205d09b83ce1a2b64:/sample.plp diff --git a/sample.plp b/sample.plp index be68403..b4d2c44 100644 --- a/sample.plp +++ b/sample.plp @@ -14,15 +14,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 "
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; }