1
0
mirror of synced 2025-12-23 11:54:18 -05:00

Clean up rewrite-local-links for insights (#34880)

This commit is contained in:
Peter Bengtsson
2023-02-17 16:30:33 -05:00
committed by GitHub
parent 892a4e37d9
commit 860a7cebda
2 changed files with 0 additions and 7 deletions

View File

@@ -40,7 +40,6 @@ export const oldEnterprisePath =
/\/([a-z]{2}\/)?(enterprise\/)?(\S+?@(\S+?\/))?(\d.\d+\/)?(user[/$])?/
// new versioning format patterns
export const adminProduct = /\/admin(\/|$|\?|#)/
export const insightsProduct = /\/insights(\/|$|\?|#)/
export const enterpriseServer = /\/enterprise-server@/
export const getEnterpriseServerNumber = /enterprise-server@(\d+\.\d+)/
@@ -71,7 +70,6 @@ export default {
enterpriseNoVersion,
oldEnterprisePath,
adminProduct,
insightsProduct,
enterpriseServer,
getEnterpriseServerNumber,
}

View File

@@ -148,11 +148,6 @@ function getNewHref(node, languageCode, version) {
if (patterns.adminProduct.test(hrefWithoutLang) && version === nonEnterpriseDefaultVersion) {
version = `enterprise-server@${latest}`
}
// insights links on dotcom always point to Enterprise
if (patterns.insightsProduct.test(hrefWithoutLang) && version === nonEnterpriseDefaultVersion) {
version = `enterprise-server@${latest}`
}
// ------ END ONE-OFF OVERRIDES ------//
// update the version in the link