Same file + extension in directory names breaks relative image assets #8921
Labels
bug
An error in the Docusaurus core causing instability or issues with its execution
domain: markdown
Related to Markdown parsing or syntax
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
When referencing static images that are colocated with alongside the Markdown file, if the directory name has
<filename>.md
in it, the image can't be found.For example, a file like
file.md
, with a nearby directory calledfile.md__static_image_assets__
, will break. It attempts to find the file in the global /static folder, even if the path infile.md
is like:This is a legal directory name, so this should work.
Reproducible demo
https://stackblitz.com/edit/github-znyym6?file=docs/file.md
Steps to reproduce
docs/
calledfile.md__static_image__assets
with animage.png
image in it.file.md
indocs/
with content of something likeExpected behavior
Should compile.
Actual behavior
Doesn't compile, looks for the image in
/static
.Your environment
Public source code: https://stackblitz.com/edit/github-znyym6?file=docs/file.md
Self-service
The text was updated successfully, but these errors were encountered: