Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a bug where backslashes in paths could show up in RST files #1047

Merged
merged 3 commits into from
Nov 2, 2022

Conversation

ayshih
Copy link
Contributor

@ayshih ayshih commented Nov 2, 2022

When the gallery directory path has an OS path separator in it, the separators need to be sanitized (on Windows) to be all forward slashes before the path is inserted into RST files. This PR fixes a missing sanitization.

For comparison, here is another place in the codebase where the sanitization is performed:

# Inside rst files forward slash defines paths
thumb = thumb.replace(os.sep, "/")

@larsoner
Copy link
Contributor

larsoner commented Nov 2, 2022

Merged latest master which should fix CIs, marking for auto-merge when green, thanks in advance @ayshih !

@larsoner larsoner enabled auto-merge (squash) November 2, 2022 15:49
@larsoner larsoner merged commit c0177d0 into sphinx-gallery:master Nov 2, 2022
@ayshih
Copy link
Contributor Author

ayshih commented Nov 2, 2022

Thanks for the quick merge!

@ayshih ayshih deleted the rst_sep branch November 2, 2022 19:59
@larsoner larsoner added the bug label Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants