Skip to content

Commit 7bd169f

Browse files
committed
be more flexible so we do not rewrite hardcoded deprecated versions OR supported
1 parent 7feff26 commit 7bd169f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/render-content/plugins/rewrite-local-links.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function getNewHref (node, languageCode, version) {
5050
// /enterprise-server/rest/reference/oauth-authorizations (this redirects to the latest version)
5151
// /enterprise-server@latest/rest/reference/oauth-authorizations (this redirects to the latest version)
5252
const firstLinkSegment = href.split('/')[1]
53-
if ([...supportedPlans, ...supportedVersions, 'enterprise-server@latest'].includes(firstLinkSegment)) {
53+
if ([...supportedPlans, ...supportedVersions, 'enterprise-server@latest'].some(v => firstLinkSegment.startsWith(v))) {
5454
newHref = path.join('/', languageCode, href)
5555
}
5656

0 commit comments

Comments
 (0)