summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar matthewp <matthewp@users.noreply.github.com> 2021-11-19 20:26:02 +0000
committerGravatar GitHub Actions <actions@github.com> 2021-11-19 20:26:02 +0000
commit16d972fe46d02ecca98009e4eba445ef8b70cf55 (patch)
treee8733aa1ba025b9cef78aeedb9ba679db5c26ec1
parenta0d4d99a9ae08be30a3c21a2b91fda3640ad362c (diff)
downloadastro-16d972fe46d02ecca98009e4eba445ef8b70cf55.tar.gz
astro-16d972fe46d02ecca98009e4eba445ef8b70cf55.tar.zst
astro-16d972fe46d02ecca98009e4eba445ef8b70cf55.zip
[ci] yarn format
-rw-r--r--packages/astro/src/vite-plugin-build-html/index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/astro/src/vite-plugin-build-html/index.ts b/packages/astro/src/vite-plugin-build-html/index.ts
index 027a244aa..c3b24ddf1 100644
--- a/packages/astro/src/vite-plugin-build-html/index.ts
+++ b/packages/astro/src/vite-plugin-build-html/index.ts
@@ -31,7 +31,8 @@ const isBuildableLink = (node: parse5.Element, srcRoot: string, srcRootWeb: stri
if (typeof href !== 'string' || !href.length) return false;
return href.startsWith(srcRoot) || href.startsWith(srcRootWeb) || `/${href}`.startsWith(srcRoot); // Windows fix: some paths are missing leading "/"
};
-const isBuildableImage = (node: parse5.Element, srcRoot: string, srcRootWeb: string) => getTagName(node) === 'img' && (getAttribute(node, 'src')?.startsWith(srcRoot) || getAttribute(node, 'src')?.startsWith(srcRootWeb));
+const isBuildableImage = (node: parse5.Element, srcRoot: string, srcRootWeb: string) =>
+ getTagName(node) === 'img' && (getAttribute(node, 'src')?.startsWith(srcRoot) || getAttribute(node, 'src')?.startsWith(srcRootWeb));
const hasSrcSet = (node: parse5.Element) => tagsWithSrcSet.has(getTagName(node)) && !!getAttribute(node, 'srcset');
const isHoistedScript = (node: parse5.Element) => getTagName(node) === 'script' && hasAttribute(node, 'hoist');