summaryrefslogtreecommitdiff
path: root/docs/src/util.ts
diff options
context:
space:
mode:
authorGravatar Jonathan Neal <jonathantneal@hotmail.com> 2021-12-22 16:11:05 -0500
committerGravatar GitHub <noreply@github.com> 2021-12-22 16:11:05 -0500
commit6ddd7678ffb6598ae6e263706813cb5e94535f02 (patch)
treed4b45f7590b59c3574bd6593b17d8066f71007c6 /docs/src/util.ts
parent305ce4182fbe89abcfb88008ddce178bd8863b6a (diff)
downloadastro-6ddd7678ffb6598ae6e263706813cb5e94535f02.tar.gz
astro-6ddd7678ffb6598ae6e263706813cb5e94535f02.tar.zst
astro-6ddd7678ffb6598ae6e263706813cb5e94535f02.zip
Use accessible indentation (#2253)
Diffstat (limited to 'docs/src/util.ts')
-rw-r--r--docs/src/util.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/src/util.ts b/docs/src/util.ts
index 269373735..c20b0713e 100644
--- a/docs/src/util.ts
+++ b/docs/src/util.ts
@@ -1,14 +1,14 @@
export function getLanguageFromURL(pathname: string) {
- const langCodeMatch = pathname.match(/\/([a-z]{2}-?[A-Z]{0,2})\//);
- return langCodeMatch ? langCodeMatch[1] : 'en';
+ 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(/^[/\\]+/, '');
+ return path.replace(/^[/\\]+/, '');
}
/** Remove \ and / from end of string */
export function removeTrailingSlash(path: string) {
- return path.replace(/[/\\]+$/, '');
+ return path.replace(/[/\\]+$/, '');
}