Skip to content

Conversation

prozessorkern
Copy link

Description

we use this plugin to include readme.md files into the sphinx documentation.
In this usecase used images are referenced relative to the *.md file - currently sphinx will not be able to find those files.

With this fix sphinx will search for images relative to the md file.

@michimussato
Copy link

Merge please.

@amyreese
Copy link
Member

amyreese commented Feb 3, 2025

Would be nice to include some test cases or expected inputs/outputs.

Comment on lines +232 to +234
image_path = os.path.join(os.path.dirname(self.mdinclude_path), src).replace(
"\\", "/"
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see this using pathlib and proper separator normalization rather than string replacements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants