summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar natemoo-re <natemoo-re@users.noreply.github.com> 2022-01-31 22:15:39 +0000
committerGravatar GitHub Actions <actions@github.com> 2022-01-31 22:15:39 +0000
commitf3b35023fdf02e23936ba10040fe5b0b80beaefe (patch)
tree02cdc817ed186aa58071264e0b87043de694c310
parent6fe1b0279fce5a7a0e90ff79746ea0b641da3e21 (diff)
downloadastro-f3b35023fdf02e23936ba10040fe5b0b80beaefe.tar.gz
astro-f3b35023fdf02e23936ba10040fe5b0b80beaefe.tar.zst
astro-f3b35023fdf02e23936ba10040fe5b0b80beaefe.zip
[ci] yarn format
-rw-r--r--packages/astro/src/runtime/server/escape.ts6
-rw-r--r--packages/astro/src/runtime/server/index.ts4
2 files changed, 6 insertions, 4 deletions
diff --git a/packages/astro/src/runtime/server/escape.ts b/packages/astro/src/runtime/server/escape.ts
index 52c928186..a0482fdf2 100644
--- a/packages/astro/src/runtime/server/escape.ts
+++ b/packages/astro/src/runtime/server/escape.ts
@@ -17,7 +17,7 @@ ${string}`);
// Return unescaped content for now. To be removed.
return string;
-}
+};
/**
* RawString is a "blessed" version of String
@@ -25,8 +25,8 @@ ${string}`);
*/
export class UnescapedString extends String {}
-/**
- * unescapeHTML marks a string as raw, unescaped HTML.
+/**
+ * unescapeHTML marks a string as raw, unescaped HTML.
* This should only be generated internally, not a public API.
*
* Need to cast the return value `as unknown as string` so TS doesn't yell at us.
diff --git a/packages/astro/src/runtime/server/index.ts b/packages/astro/src/runtime/server/index.ts
index ae4994ecd..9d9fd076a 100644
--- a/packages/astro/src/runtime/server/index.ts
+++ b/packages/astro/src/runtime/server/index.ts
@@ -237,7 +237,9 @@ If you're still stuck, please open an issue on GitHub or join us at https://astr
// as a string and the user is responsible for adding a script tag for the component definition.
if (!html && typeof Component === 'string') {
html = await renderAstroComponent(
- await render`<${Component}${spreadAttributes(props)}${unescapeHTML((children == null || children == '') && voidElementNames.test(Component) ? `/>` : `>${children}</${Component}>`)}`
+ await render`<${Component}${spreadAttributes(props)}${unescapeHTML(
+ (children == null || children == '') && voidElementNames.test(Component) ? `/>` : `>${children}</${Component}>`
+ )}`
);
}