From d97d61ec45672e7618d834475f32f34ee135e536 Mon Sep 17 00:00:00 2001 From: natemoo-re Date: Fri, 28 Jan 2022 02:38:13 +0000 Subject: [PATCH] [ci] yarn format --- packages/astro/src/runtime/server/escape.ts | 4 ++-- packages/astro/src/runtime/server/index.ts | 5 +---- 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, '&').replace(/"/g, '"'); -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) {