Skip to content

Commit 8bf23f0

Browse files
committed
Make What's New work better with pre-release page
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.
1 parent 404cb9c commit 8bf23f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

release-notes/whatsnew.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
latest release is hidden by the caller can use URL parameters to enable
1313
them. This is mostly for use in MacVim's internal What's New page.
1414
15-
Use ?from=<rev_exclusive>&to=<rev> to list a range of releases.
15+
Use ?from=<rev_exclusive>&to=<rev_inclusive> to list a range of releases.
1616
Use ?version=<rev> to list a single release from its revision number.
1717
-->
1818

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

0 commit comments

Comments
 (0)