0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-20 22:12:38 -05:00

[ci] format

This commit is contained in:
Steven Benner 2024-01-23 23:17:58 +00:00 committed by astrobot-houston
parent ccc05d5401
commit 2e58904cd4

View file

@ -13,7 +13,10 @@ export function getMarkdownCodeForImages(imagePaths: MarkdownImagePath[], html:
.map((entry) => {
const rawUrl = JSON.stringify(entry.raw);
return `{
const regex = new RegExp('__ASTRO_IMAGE_="([^"]*' + ${rawUrl.replace(/[.*+?^${}()|[\]\\]/g, '\\\\$&')} + '[^"]*)"', 'g');
const regex = new RegExp('__ASTRO_IMAGE_="([^"]*' + ${rawUrl.replace(
/[.*+?^${}()|[\]\\]/g,
'\\\\$&'
)} + '[^"]*)"', 'g');
let match;
let occurrenceCounter = 0;
while ((match = regex.exec(html)) !== null) {