summaryrefslogtreecommitdiff
path: root/packages/integrations/mdx/test/mdx-script-style-raw.test.js
diff options
context:
space:
mode:
authorGravatar Steven Benner <141884+stevenbenner@users.noreply.github.com> 2024-01-23 15:16:56 -0800
committerGravatar GitHub <noreply@github.com> 2024-01-23 18:16:56 -0500
commitccc05d54014e24c492ca5fddd4862f318aac8172 (patch)
tree8393546a7904738c62300752276f02dde77086f4 /packages/integrations/mdx/test/mdx-script-style-raw.test.js
parent5e466ef499fa46a4fae76a90281884f23496ef59 (diff)
downloadastro-ccc05d54014e24c492ca5fddd4862f318aac8172.tar.gz
astro-ccc05d54014e24c492ca5fddd4862f318aac8172.tar.zst
astro-ccc05d54014e24c492ca5fddd4862f318aac8172.zip
Fix build failure when image file name includes special characters (#9781)
The latest version of `vite-plugin-markdown` uses a regular expression that includes the file path via string concatenation. However the file path is not escaped for use in a regular expressions. So if a markdown document includes a reference to an image file name which includes certain special characters it will cause the build to fail. This patch escapes regex special characters in the file path string being injected into the regular expression. While I found that not all special characters will cause this problem, it seems safer to simply escape all regex specials. I also added test to verify this. Related to: Commit 165cfc154be477337037185c32b308616d1ed6fa Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Diffstat (limited to 'packages/integrations/mdx/test/mdx-script-style-raw.test.js')
0 files changed, 0 insertions, 0 deletions