From 85cc695dc68944707b1ceb6eec20acba46f42958 Mon Sep 17 00:00:00 2001 From: Justin Fowler Date: Tue, 10 Sep 2024 11:15:23 -0500 Subject: [PATCH] fix(site): strip version build info from docs link URLs (#14601) --- site/src/utils/docs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/src/utils/docs.ts b/site/src/utils/docs.ts index 1a10c3e808..162f94a354 100644 --- a/site/src/utils/docs.ts +++ b/site/src/utils/docs.ts @@ -9,7 +9,7 @@ function defaultDocsUrl(): string { } // Strip the postfix version info that's not part of the link. - const i = version?.indexOf("-") ?? -1; + const i = version?.match(/[+-]/)?.index ?? -1; if (i >= 0) { version = version.slice(0, i); }