Skip to content

Commit

Permalink
delete unuse
Browse files Browse the repository at this point in the history
  • Loading branch information
liruifengv committed Nov 4, 2023
1 parent fc29e10 commit 69e7925
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/starlight/integrations/asides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ function pathToLocale(slug: string, config: StarlightConfig): string | undefined
return undefined;
}

function localeToLang(locale: string | undefined, config: StarlightConfig): string {
const lang = locale ? config.locales?.[locale]?.lang : config.locales?.root?.lang;
const defaultLang = config.defaultLocale?.lang || config.defaultLocale?.locale;
return lang || defaultLang || 'en';
}

/** get current lang from file full path */
function getLocaleFromPath(
unformattedPath: string,
Expand All @@ -37,8 +31,6 @@ function getLocaleFromPath(
.replace(docsDir.pathname, '');
const locale = pathToLocale(path, starlightConfig);
return locale;
// maybe don't need this
// return localeToLang(locale, starlightConfig);
}

/** Hacky function that generates an mdast HTML tree ready for conversion to HTML by rehype. */
Expand Down

0 comments on commit 69e7925

Please sign in to comment.