summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordelucis2024-01-26 22:13:43 +0000
committerfredkbot2024-01-26 22:13:43 +0000
commite3e38aee2fcea794043005e258cc892ea7e2b84e (patch)
tree709320e6621060c230a99ba7e2d4ff25cfecbd4f
parentce05dfb4b1e9b90fad057d5d4328e4445f986b3b (diff)
downloadIT.starlight-e3e38aee2fcea794043005e258cc892ea7e2b84e.tar.gz
IT.starlight-e3e38aee2fcea794043005e258cc892ea7e2b84e.tar.bz2
IT.starlight-e3e38aee2fcea794043005e258cc892ea7e2b84e.zip
[ci] format
-rw-r--r--docs/src/content/docs/guides/components.mdx4
-rw-r--r--packages/starlight/index.ts4
-rw-r--r--packages/starlight/integrations/expressive-code/exports.ts2
-rw-r--r--packages/starlight/integrations/shared/pathToLocale.ts2
4 files changed, 5 insertions, 7 deletions
diff --git a/docs/src/content/docs/guides/components.mdx b/docs/src/content/docs/guides/components.mdx
index 56ffe1f0..395b9baf 100644
--- a/docs/src/content/docs/guides/components.mdx
+++ b/docs/src/content/docs/guides/components.mdx
@@ -209,7 +209,7 @@ import { Code } from '@astrojs/starlight/components';
export const exampleCode = `console.log('This could come from a file or CMS!');`;
export const fileName = 'example.js';
-export const highlights = ["file", "CMS"];
+export const highlights = ['file', 'CMS'];
<Code code={exampleCode} lang="js" title={fileName} mark={highlights} />
```
@@ -220,7 +220,7 @@ import { Code } from '@astrojs/starlight/components';
export const exampleCode = `console.log('This could come from a file or CMS!');`;
export const fileName = 'example.js';
-export const highlights = ["file", "CMS"];
+export const highlights = ['file', 'CMS'];
<Code code={exampleCode} lang="js" title={fileName} mark={highlights} />
diff --git a/packages/starlight/index.ts b/packages/starlight/index.ts
index 353152e1..f5288619 100644
--- a/packages/starlight/index.ts
+++ b/packages/starlight/index.ts
@@ -51,9 +51,7 @@ export default function StarlightIntegration({
// config or by a plugin.
const allIntegrations = [...config.integrations, ...integrations];
if (!allIntegrations.find(({ name }) => name === 'astro-expressive-code')) {
- integrations.push(
- ...starlightExpressiveCode({ starlightConfig, useTranslations })
- );
+ integrations.push(...starlightExpressiveCode({ starlightConfig, useTranslations }));
}
if (!allIntegrations.find(({ name }) => name === '@astrojs/sitemap')) {
integrations.push(starlightSitemap(starlightConfig));
diff --git a/packages/starlight/integrations/expressive-code/exports.ts b/packages/starlight/integrations/expressive-code/exports.ts
index 8e9cff47..e789b085 100644
--- a/packages/starlight/integrations/expressive-code/exports.ts
+++ b/packages/starlight/integrations/expressive-code/exports.ts
@@ -35,4 +35,4 @@
export * from 'astro-expressive-code';
-export { getStarlightEcConfigPreprocessor } from './index'
+export { getStarlightEcConfigPreprocessor } from './index';
diff --git a/packages/starlight/integrations/shared/pathToLocale.ts b/packages/starlight/integrations/shared/pathToLocale.ts
index 0b2af25b..aa8748cd 100644
--- a/packages/starlight/integrations/shared/pathToLocale.ts
+++ b/packages/starlight/integrations/shared/pathToLocale.ts
@@ -23,7 +23,7 @@ export function pathToLocale(
const srcDir = new URL(astroConfig.srcDir, astroConfig.root);
const docsDir = new URL('content/docs/', srcDir);
// Format path to unix style path.
- path = path?.replace(/\\/g, '/')
+ path = path?.replace(/\\/g, '/');
// Ensure that the page path starts with a slash if the docs directory also does,
// which makes stripping the docs path in the next step work on Windows, too.
if (path && !path.startsWith('/') && docsDir.pathname.startsWith('/')) path = '/' + path;