git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
browser: link to parent feature
[sheet.git]
/
browser.plp
diff --git
a/browser.plp
b/browser.plp
index b2a7867fd7a402b64bfd45971c3abf88bbd526a8..d368dbb90c81f62b04311c5812d41bb39edec39b 100644
(file)
--- a/
browser.plp
+++ b/
browser.plp
@@
-236,10
+236,14
@@
sub saytitlecol {
} $row->{title};
print '<div class=aside>';
s/\.?$/./, print "<p>$_</p>" for map { ref $_ ? @$_ : $_ || () }
} $row->{title};
print '<div class=aside>';
s/\.?$/./, print "<p>$_</p>" for map { ref $_ ? @$_ : $_ || () }
- Entity($row->{description}), formathtml($row->{notes}); # sic
+ Entity($row->{description}),
+ map { s/\s*\n/\n<br>/g; $_ } $row->{notes};
printf 'Resources: %s.', join(', ', map {
sprintf '<a href="%s">%s</a>', EscapeHTML($_->{url}), $_->{title}
} @$_) for grep { @$_ } $row->{links} // ();
printf 'Resources: %s.', join(', ', map {
sprintf '<a href="%s">%s</a>', EscapeHTML($_->{url}), $_->{title}
} @$_) for grep { @$_ } $row->{links} // ();
+ printf '<br>Parent feature: %s.', join(', ', map {
+ sprintf '<a href="%s">%s</a>', EscapeHTML("#$_"), $caniuse->{data}->{$_}->{title}
+ } $_) for $row->{parent} || ();
print '</div>';
}
print '</div>';
}
@@
-310,16
+314,6
@@
for my $id (sort {
say '</tbody>';
say '</table>';
say '</tbody>';
say '</table>';
-sub formathtml {
- my $ref = defined wantarray ? [@_] : \@_;
- for (@$ref) {
- s/& (?!\w)/&/gx;
- s/< \s/</gx;
- s/\n\K\n/<br>/g;
- }
- return @$ref;
-}
-
sub paddedver {
# normalised version number comparable as string (cmp)
shift =~ /(?:.*-|^)(\d*)(.*)/;
sub paddedver {
# normalised version number comparable as string (cmp)
shift =~ /(?:.*-|^)(\d*)(.*)/;
@@
-329,10
+323,11
@@
sub paddedver {
sub showversions {
my @span = ($_[0], @_>1 ? $_[-1] : ());
sub showversions {
my @span = ($_[0], @_>1 ? $_[-1] : ());
+ s/-.*// for $span[0];
for (@span) {
s/^\./0./;
s/x$/.*/;
for (@span) {
s/^\./0./;
s/x$/.*/;
- s/
-.*
//;
+ s/
.*-
//;
}
return join('‒', @span);
}
}
return join('‒', @span);
}