Skip to content

Commit

Permalink
Make What's New work better with pre-release page
Browse files Browse the repository at this point in the history
When requesting a specific version from What's New page, show the entire
major version below the version so that when requesting from a
pre-release build the user will see the main release's notes as well
which gives more context. The pre-release notes still won't show up for
normal users though.
  • Loading branch information
ychin committed Oct 21, 2023
1 parent 404cb9c commit 8bf23f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions release-notes/whatsnew.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
latest release is hidden by the caller can use URL parameters to enable
them. This is mostly for use in MacVim's internal What's New page.
Use ?from=<rev_exclusive>&to=<rev> to list a range of releases.
Use ?from=<rev_exclusive>&to=<rev_inclusive> to list a range of releases.
Use ?version=<rev> to list a single release from its revision number.
-->

Expand Down Expand Up @@ -112,7 +112,7 @@
}
else if (params.has('version')) {
toRev = parseFloat(params.get('version'));
fromRev = toRev - 1;
fromRev = Math.floor(toRev) - 0.01; // Show the main release along with all the pre-release versions
}
if (!isNaN(fromRev) && !isNaN(toRev)) {
let foundOne = false;
Expand Down

0 comments on commit 8bf23f0

Please sign in to comment.