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

fix(mdx-loader): allow image paths to be URL encoded #6792

Merged
merged 1 commit into from
Mar 2, 2022
Merged

Conversation

Josh-Cena
Copy link
Collaborator

@Josh-Cena Josh-Cena commented Mar 1, 2022

@Josh-Cena Josh-Cena added the pr: polish This PR adds a very minor behavior improvement that users will enjoy. label Mar 1, 2022
@Josh-Cena Josh-Cena requested review from slorber and lex111 as code owners March 1, 2022 10:33
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Mar 1, 2022
@netlify
Copy link

netlify bot commented Mar 1, 2022

✔️ [V2]

🔨 Explore the source changes: 7a220bb

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/621df6960cbf840008c994a9

😎 Browse the preview: https://deploy-preview-6792--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Mar 1, 2022

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 52
🟢 Accessibility 100
🟢 Best practices 92
🟢 SEO 100
🟢 PWA 90

Lighthouse ran on https://deploy-preview-6792--docusaurus-2.netlify.app/

@github-actions
Copy link

github-actions bot commented Mar 1, 2022

Size Change: 0 B

Total Size: 789 kB

ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 49.7 kB
website/build/assets/css/styles.********.css 106 kB
website/build/assets/js/main.********.js 596 kB
website/build/index.html 37.6 kB

compressed-size-action

@slorber
Copy link
Collaborator

slorber commented Mar 2, 2022

Thanks 👍

@slorber slorber merged commit 8a24d56 into main Mar 2, 2022
@slorber slorber deleted the jc/encode-image branch March 2, 2022 11:14
@ryh
Copy link

ryh commented Mar 2, 2022

But there are rare case files named with url encoded in file system.
I did not test on Github pages, but marktext.app won't recognize those.

@Josh-Cena
Copy link
Collaborator Author

@ryh But why?🤷‍♂️ Where're the images coming from? How much effort would it be to correct those image paths?

marktext.app won't recognize those.

Does that mean that at least we are in line with the behavior of Mark Text? I tested on Typora and it seems to be unhappy with either ![](./foo%202.png) or ![](./foo 2.png) when the file is literally called foo%202.png. I don't think we should do anything, since in this case, you are supposed to double-encode your path, e.g. ![](./foo%25202.png)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: polish This PR adds a very minor behavior improvement that users will enjoy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

URL encoded image paths should be resolvable
4 participants