git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common: treat exception references as alert parameters
[sheet.git]
/
sample.plp
diff --git
a/sample.plp
b/sample.plp
index 7f8b636c83f7d8e5a694ff16ae045632f562b9fe..f824e1458e39e4f24356267692f28ac8900090ff 100644
(file)
--- a/
sample.plp
+++ b/
sample.plp
@@
-1,20
+1,29
@@
<(common.inc.plp)><:
<(common.inc.plp)><:
+my $textinc = 'data/unicode-sampler/unicode.txt';
+
Html({
title => "unicode sampler",
version => '2.0',
stylesheet => [qw'light dark mono red'],
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 Abort("Could not open text at $textinc", 501, $!);
+local $/ = "\n\n";
-my $t
itle
= readline $source;
-my
$hr = readline $source
;
+my $t
op
= readline $source;
+my
($title, $hr, $intro) = split /\n(\H)$1+\n/, $top, 2
;
say "<h1>$title</h1>";
say '<pre>';
say "<h1>$title</h1>";
say '<pre>';
+print $intro;
+
while (my $p = readline $source) {
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";
say "</pre>\n";