0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

fix: escape image filenames (#12697)

This commit is contained in:
Matt Kane 2024-12-09 15:54:33 +00:00 committed by GitHub
parent 163cfd67f5
commit 1c4a032247
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fix a bug that caused builds to fail if an image had a quote mark in its name

View file

@ -102,7 +102,7 @@ export class MutableDataStore extends ImmutableDataStore {
const exports: Array<string> = [];
this.#assetImports.forEach((id) => {
const symbol = importIdToSymbolName(id);
imports.push(`import ${symbol} from '${id}';`);
imports.push(`import ${symbol} from ${JSON.stringify(id)};`);
exports.push(`[${JSON.stringify(id)}, ${symbol}]`);
});
const code = /* js */ `

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View file

@ -3,6 +3,8 @@ title: Endeavour
description: 'Learn about the Endeavour NASA space shuttle.'
publishedDate: 'Sun Jul 11 2021 00:00:00 GMT-0400 (Eastern Daylight Time)'
tags: [space, 90s]
heroImage: "@images/I'm back.jpg"
---
**Source:** [Wikipedia](https://en.wikipedia.org/wiki/Space_Shuttle_Endeavour)