mirror of
https://github.com/withastro/astro.git
synced 2025-01-20 22:12:38 -05:00
[ci] format
This commit is contained in:
parent
ccc05d5401
commit
2e58904cd4
1 changed files with 4 additions and 1 deletions
|
@ -13,7 +13,10 @@ export function getMarkdownCodeForImages(imagePaths: MarkdownImagePath[], html:
|
||||||
.map((entry) => {
|
.map((entry) => {
|
||||||
const rawUrl = JSON.stringify(entry.raw);
|
const rawUrl = JSON.stringify(entry.raw);
|
||||||
return `{
|
return `{
|
||||||
const regex = new RegExp('__ASTRO_IMAGE_="([^"]*' + ${rawUrl.replace(/[.*+?^${}()|[\]\\]/g, '\\\\$&')} + '[^"]*)"', 'g');
|
const regex = new RegExp('__ASTRO_IMAGE_="([^"]*' + ${rawUrl.replace(
|
||||||
|
/[.*+?^${}()|[\]\\]/g,
|
||||||
|
'\\\\$&'
|
||||||
|
)} + '[^"]*)"', 'g');
|
||||||
let match;
|
let match;
|
||||||
let occurrenceCounter = 0;
|
let occurrenceCounter = 0;
|
||||||
while ((match = regex.exec(html)) !== null) {
|
while ((match = regex.exec(html)) !== null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue