diff options
author | 2022-02-07 13:39:53 -0500 | |
---|---|---|
committer | 2022-02-07 13:39:53 -0500 | |
commit | a911d14eabe4f4f9080b59b1c292818ea2ca6123 (patch) | |
tree | 529fdda395eedc122955fd2851954d61554869b4 /docs/src/util.ts | |
parent | 2bc91543ceeb5f3dd45e201bf75d79f186e85141 (diff) | |
download | astro-a911d14eabe4f4f9080b59b1c292818ea2ca6123.tar.gz astro-a911d14eabe4f4f9080b59b1c292818ea2ca6123.tar.zst astro-a911d14eabe4f4f9080b59b1c292818ea2ca6123.zip |
Remove docs from monorepo (#2517)
* Remove docs from monorepo
* Update PULL_REQUEST_TEMPLATE.md
* Update relative doc references with links or todo
Diffstat (limited to 'docs/src/util.ts')
-rw-r--r-- | docs/src/util.ts | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/docs/src/util.ts b/docs/src/util.ts deleted file mode 100644 index c20b0713e..000000000 --- a/docs/src/util.ts +++ /dev/null @@ -1,14 +0,0 @@ -export function getLanguageFromURL(pathname: string) { - const langCodeMatch = pathname.match(/\/([a-z]{2}-?[A-Z]{0,2})\//); - return langCodeMatch ? langCodeMatch[1] : 'en'; -} - -/** Remove \ and / from beginning of string */ -export function removeLeadingSlash(path: string) { - return path.replace(/^[/\\]+/, ''); -} - -/** Remove \ and / from end of string */ -export function removeTrailingSlash(path: string) { - return path.replace(/[/\\]+$/, ''); -} |