diff options
author | 2023-06-06 11:21:19 -0500 | |
---|---|---|
committer | 2023-06-06 11:21:19 -0500 | |
commit | 5ed2a2f666707e579e18f2890ab89b7cc6f717c3 (patch) | |
tree | 9895d49bc5bd33a63ff0f2e94053e771a54b9dc4 /examples/docs/src/languages.ts | |
parent | d5a089810f8218f694ac56591648d36051708560 (diff) | |
download | astro-5ed2a2f666707e579e18f2890ab89b7cc6f717c3.tar.gz astro-5ed2a2f666707e579e18f2890ab89b7cc6f717c3.tar.zst astro-5ed2a2f666707e579e18f2890ab89b7cc6f717c3.zip |
chore: remove docs example (#7306)
Diffstat (limited to 'examples/docs/src/languages.ts')
-rw-r--r-- | examples/docs/src/languages.ts | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/examples/docs/src/languages.ts b/examples/docs/src/languages.ts deleted file mode 100644 index 935e5da84..000000000 --- a/examples/docs/src/languages.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { KNOWN_LANGUAGES, KNOWN_LANGUAGE_CODES } from './consts'; -export { KNOWN_LANGUAGES, KNOWN_LANGUAGE_CODES }; - -export const langPathRegex = /\/([a-z]{2}-?[A-Z]{0,2})\//; - -export function getLanguageFromURL(pathname: string) { - const langCodeMatch = pathname.match(langPathRegex); - const langCode = langCodeMatch ? langCodeMatch[1] : 'en'; - return langCode as (typeof KNOWN_LANGUAGE_CODES)[number]; -} |