summaryrefslogtreecommitdiff
path: root/packages/astro/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/astro/src')
-rw-r--r--packages/astro/src/core/render/core.ts2
-rw-r--r--packages/astro/src/runtime/server/index.ts10
-rw-r--r--packages/astro/src/runtime/server/scripts.ts4
3 files changed, 8 insertions, 8 deletions
diff --git a/packages/astro/src/core/render/core.ts b/packages/astro/src/core/render/core.ts
index 32641c020..b718b4d28 100644
--- a/packages/astro/src/core/render/core.ts
+++ b/packages/astro/src/core/render/core.ts
@@ -9,7 +9,7 @@ import type {
} from '../../@types/astro';
import type { LogOptions } from '../logger/core.js';
-import { renderComponent, renderHead, renderPage } from '../../runtime/server/index.js';
+import { renderComponent, renderPage } from '../../runtime/server/index.js';
import { getParams } from '../routing/params.js';
import { createResult } from './result.js';
import { callGetStaticPaths, findPathItemByKey, RouteCache } from './route-cache.js';
diff --git a/packages/astro/src/runtime/server/index.ts b/packages/astro/src/runtime/server/index.ts
index 322e212df..8c58711c5 100644
--- a/packages/astro/src/runtime/server/index.ts
+++ b/packages/astro/src/runtime/server/index.ts
@@ -662,17 +662,15 @@ export async function renderHead(result: SSRResult): Promise<string> {
const links = Array.from(result.links)
.filter(uniqueElements)
.map((link) => renderElement('link', link, false));
- return markHTMLString(
- links.join('\n') + styles.join('\n') + scripts.join('\n')
- );
+ return markHTMLString(links.join('\n') + styles.join('\n') + scripts.join('\n'));
}
// This function is called by Astro components that do not contain a <head> component
// This accomodates the fact that using a <head> is optional in Astro, so this
-// is called before a component's first non-head HTML element. If the head was
-// already injected it is a noop.
+// is called before a component's first non-head HTML element. If the head was
+// already injected it is a noop.
export function maybeRenderHead(result: SSRResult): string | Promise<string> {
- if(alreadyHeadRenderedResults.has(result)) {
+ if (alreadyHeadRenderedResults.has(result)) {
return '';
}
return renderHead(result);
diff --git a/packages/astro/src/runtime/server/scripts.ts b/packages/astro/src/runtime/server/scripts.ts
index 4fe7b9057..2dba232f9 100644
--- a/packages/astro/src/runtime/server/scripts.ts
+++ b/packages/astro/src/runtime/server/scripts.ts
@@ -59,7 +59,9 @@ export function getPrescripts(type: PrescriptType, directive: string): string {
// deps to be loaded immediately.
switch (type) {
case 'both':
- return `<style>astro-island,astro-slot{display:contents}</style><script>${getDirectiveScriptText(directive) + islandScript}</script>`;
+ return `<style>astro-island,astro-slot{display:contents}</style><script>${
+ getDirectiveScriptText(directive) + islandScript
+ }</script>`;
case 'directive':
return `<script>${getDirectiveScriptText(directive)}</script>`;
}