git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1fc471
)
sample: reference chapter titles by first word
author
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 26 Oct 2023 22:11:04 +0000
(
00:11
+0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 26 Oct 2023 23:30:04 +0000
(
01:30
+0200)
Support client targeting within the document.
sample.plp
patch
|
blob
|
history
diff --git
a/sample.plp
b/sample.plp
index f824e1458e39e4f24356267692f28ac8900090ff..be68403b48ce1e3bbfdccc96488d60434c3f1bf5 100644
(file)
--- a/
sample.plp
+++ b/
sample.plp
@@
-22,7
+22,7
@@
print $intro;
while (my $p = readline $source) {
EscapeHTML($p);
- $p =~ s{ \A (
\N+:) \n\Z }{<h2
>$1</h2>}x;
+ $p =~ s{ \A (
(\pL+) \N*:) \n\Z }{<h2 id="\L$2\E"
>$1</h2>}x;
print $p;
}