Merge branch 'support-hardcoded-version-or-plan-in-link' of github.com:github/docs-internal into support-hardcoded-version-or-plan-in-link
This commit is contained in:
@@ -35,7 +35,7 @@ function getNewHref (link, languageCode, version) {
|
||||
// /enterprise-server/rest/reference/oauth-authorizations (this redirects to the latest version)
|
||||
// /enterprise-server@latest/rest/reference/oauth-authorizations (this redirects to the latest version)
|
||||
const firstLinkSegment = href.split('/')[1]
|
||||
if (supportedPlans.includes(firstLinkSegment) || supportedVersions.includes(firstLinkSegment) || firstLinkSegment === 'enterprise-server@latest') {
|
||||
if ([...supportedPlans, ...supportedVersions, 'enterprise-server@latest'].includes(firstLinkSegment)) {
|
||||
newHref = pathUtils.getPathWithLanguage(href, languageCode)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user