summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar matthewp <matthewp@users.noreply.github.com> 2022-10-05 20:32:46 +0000
committerGravatar fredkbot <fred+astrobot@astro.build> 2022-10-05 20:32:46 +0000
commitd22d77856bbf26b8cbe2e55355b177cb2a712bd8 (patch)
treec5155e5131a24fd89831b05286c52af0991eb996
parent1f890b3363d8ce232571612056b485c13983e5ef (diff)
downloadastro-d22d77856bbf26b8cbe2e55355b177cb2a712bd8.tar.gz
astro-d22d77856bbf26b8cbe2e55355b177cb2a712bd8.tar.zst
astro-d22d77856bbf26b8cbe2e55355b177cb2a712bd8.zip
[ci] format
-rw-r--r--packages/astro/src/runtime/server/jsx.ts4
-rw-r--r--packages/astro/src/runtime/server/render/component.ts4
-rw-r--r--packages/astro/src/runtime/server/render/page.ts4
3 files changed, 5 insertions, 7 deletions
diff --git a/packages/astro/src/runtime/server/jsx.ts b/packages/astro/src/runtime/server/jsx.ts
index 0804ddfe9..05efe2b31 100644
--- a/packages/astro/src/runtime/server/jsx.ts
+++ b/packages/astro/src/runtime/server/jsx.ts
@@ -1,19 +1,17 @@
/* eslint-disable no-console */
-import type { ComponentIterable } from './render/component';
import { SSRResult } from '../../@types/astro.js';
import { AstroJSX, isVNode } from '../../jsx-runtime/index.js';
import {
escapeHTML,
- HTMLBytes,
HTMLString,
markHTMLString,
renderComponent,
- RenderInstruction,
renderToString,
spreadAttributes,
voidElementNames,
} from './index.js';
import { HTMLParts } from './render/common.js';
+import type { ComponentIterable } from './render/component';
const ClientOnlyPlaceholder = 'astro-client-only';
diff --git a/packages/astro/src/runtime/server/render/component.ts b/packages/astro/src/runtime/server/render/component.ts
index 9ad9b98d5..0b6c90ebe 100644
--- a/packages/astro/src/runtime/server/render/component.ts
+++ b/packages/astro/src/runtime/server/render/component.ts
@@ -280,14 +280,14 @@ If you're still stuck, please open an issue on GitHub or join us at https://astr
}
if (!hydration) {
- return (async function *() {
+ return (async function* () {
if (slotInstructions) {
yield* slotInstructions;
}
if (isPage || renderer?.name === 'astro:jsx') {
yield html;
- } else {
+ } else {
yield markHTMLString(html.replace(/\<\/?astro-slot\>/g, ''));
}
})();
diff --git a/packages/astro/src/runtime/server/render/page.ts b/packages/astro/src/runtime/server/render/page.ts
index 3d7ae8d06..7562c8563 100644
--- a/packages/astro/src/runtime/server/render/page.ts
+++ b/packages/astro/src/runtime/server/render/page.ts
@@ -1,6 +1,6 @@
import type { SSRResult } from '../../../@types/astro';
-import type { AstroComponentFactory } from './index';
import type { ComponentIterable } from './component';
+import type { AstroComponentFactory } from './index';
import { isHTMLString } from '../escape.js';
import { createResponse } from '../response.js';
@@ -32,7 +32,7 @@ async function iterableToHTMLBytes(
if (i === 0) {
if (!/<!doctype html/i.test(String(chunk))) {
parts.append('<!DOCTYPE html>\n', result);
- if(onDocTypeInjection) {
+ if (onDocTypeInjection) {
await onDocTypeInjection(parts);
}
}