0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-10 23:01:26 -05:00

style: lint

This commit is contained in:
Josh Chappelow 2024-08-18 14:58:11 +09:00
parent 08c9867ea6
commit 0fbcb2495f

View file

@ -333,12 +333,14 @@ async function emitOptimizedImages(
globalThis.astroAsset.referencedImages.add(fsPath);
}
const pathToImg = prependForwardSlash(path.relative(
const pathToImg = prependForwardSlash(
path.relative(
ctx.astroConfig.root.pathname,
path.join(path.dirname(ctx.filePath), node.attributes.src)
));
path.join(path.dirname(ctx.filePath), node.attributes.src),
),
);
node.attributes[attributeName] = { ...src, fsPath };
node.attributes.src = pathToImg;
node.attributes.src = pathToImg;
}
} else {
throw new MarkdocError({