Stop /api/pagelist/free-pro-team from redirecting to French (#64171) · github/docs@9ca2653 · GitHub
Skip to content

Commit 9ca2653

Browse files
heiskrCopilot
andauthored
Stop /api/pagelist/free-pro-team from redirecting to French (#64171)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: bf5940de-658e-4a1a-bffa-3018fb78b138
1 parent 9e251f3 commit 9ca2653

3 files changed

Lines changed: 27 additions & 2 deletions

File tree

‎src/article-api/tests/pagelist.ts‎

Lines changed: 6 additions & 0 deletions

‎src/frame/lib/patterns.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const getEnterpriseVersionNumber = /enterprise\/(\d+\.\d+(?:\.340)?)/
1616
export const removeEnterpriseVersion = /(enterprise\/)\d+\.\d+\//
1717
export const guides = /guides\//
1818
export const hasLanguageCode = /^\/[a-z]{2}(\/|$|\?)/
19-
export const getLanguageCode = /^\/([a-z]{2})/
19+
export const getLanguageCode = /^\/([a-z]{2})(?=\/|$|\?)/
2020
export const trailingSlash = /^(.+?)\/+?$/
2121
export const searchPath = /\/search(?:\/)?(\?)/
2222
export const ymd = /^\d{4}-\d{2}-\d{2}$/

‎src/frame/tests/path-utils.ts‎

Lines changed: 20 additions & 1 deletion

0 commit comments

Comments
 (0)