summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar natemoo-re <natemoo-re@users.noreply.github.com> 2022-01-28 02:38:13 +0000
committerGravatar GitHub Actions <actions@github.com> 2022-01-28 02:38:13 +0000
commitd97d61ec45672e7618d834475f32f34ee135e536 (patch)
tree71f5b317ce66a67062200e83cebfdc226778f1e3
parent005751a920c14423648fd45b53cebc94e5108e9f (diff)
downloadastro-d97d61ec45672e7618d834475f32f34ee135e536.tar.gz
astro-d97d61ec45672e7618d834475f32f34ee135e536.tar.zst
astro-d97d61ec45672e7618d834475f32f34ee135e536.zip
[ci] yarn format
-rw-r--r--packages/astro/src/runtime/server/escape.ts4
-rw-r--r--packages/astro/src/runtime/server/index.ts5
2 files changed, 3 insertions, 6 deletions
diff --git a/packages/astro/src/runtime/server/escape.ts b/packages/astro/src/runtime/server/escape.ts
index 3b07b2290..f499dca5b 100644
--- a/packages/astro/src/runtime/server/escape.ts
+++ b/packages/astro/src/runtime/server/escape.ts
@@ -1,3 +1,3 @@
-const entities = { '"': 'quot', '&': 'amp', '\'': 'apos', '<': 'lt', '>': 'gt' } as const
+const entities = { '"': 'quot', '&': 'amp', "'": 'apos', '<': 'lt', '>': 'gt' } as const;
-export const escapeHTML = (string: any) => string.replace(/["'&<>]/g, (char: keyof typeof entities) => '&' + entities[char] + ';')
+export const escapeHTML = (string: any) => string.replace(/["'&<>]/g, (char: keyof typeof entities) => '&' + entities[char] + ';');
diff --git a/packages/astro/src/runtime/server/index.ts b/packages/astro/src/runtime/server/index.ts
index 9cdad6877..633f41957 100644
--- a/packages/astro/src/runtime/server/index.ts
+++ b/packages/astro/src/runtime/server/index.ts
@@ -309,10 +309,7 @@ export function createAstro(filePathname: string, site: string, projectRootStr:
const toAttributeString = (value: any) => String(value).replace(/&/g, '&#38;').replace(/"/g, '&#34;');
-const STATIC_DIRECTIVES = new Set([
- 'set:html',
- 'set:text'
-])
+const STATIC_DIRECTIVES = new Set(['set:html', 'set:text']);
// A helper used to turn expressions into attribute key/value
export function addAttribute(value: any, key: string) {