diff options
author | EuAndreh <eu@euandre.org> | 2023-03-29 10:50:09 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-03-29 10:50:09 -0300 |
commit | b44365bcb9c42e5ab9f677a67979edaf5cb6659d (patch) | |
tree | 9ae918c0ae434aa09a145c5384bfb0c8d9793bd7 /src/bin | |
parent | src/bin/paku.in: Move abuild(1) tmpdirs into .abuild/ to make more them ignor... (diff) | |
download | package-repository-b44365bcb9c42e5ab9f677a67979edaf5cb6659d.tar.gz package-repository-b44365bcb9c42e5ab9f677a67979edaf5cb6659d.tar.xz |
src/bin/paku.in: Remove "-latest" suffix from HTML ids
Diffstat (limited to 'src/bin')
-rwxr-xr-x | src/bin/paku.in | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/bin/paku.in b/src/bin/paku.in index 7f7c726..ca43aa6 100755 --- a/src/bin/paku.in +++ b/src/bin/paku.in @@ -725,13 +725,16 @@ sub emit_html() { my $guix_suffix = $pkg->{label} eq 'latest' ? '' : '@' . $pkg->{label} =~ s/-/./gr; my $suffix = $pkg->{label} eq 'latest' ? '' : "-$pkg->{label}"; my $apt_suffix = $suffix =~ s/-/=/r; - my $ver = $pkg->{label} eq 'latest' ? $pkg->{label} : $pkg->{version}; + my $id = $pkg->{name} . ( + $pkg->{label} eq 'latest' ? '' : "-$pkg->{version}" + ); + my $label = $pkg->{label} eq 'latest' ? 'latest' : $pkg->{version}; print <<~EOF; - <li id="$pkg->{name}-$ver"> + <li id="$id"> <details> <summary> - <a href="#$pkg->{name}-$ver">$pkg->{name}</a> - ($ver) - $pkg->{description} + <a href="#$id">$pkg->{name}</a> + ($label) - $pkg->{description} </summary> <p> <a href="$pkg->{homepage}">Homepage</a> |