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

chore: adjust the regex for previewing images so that it only attempts to render if the image has a bracket immediately preceding the parentheses #608

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mayraamaral
Copy link

@mayraamaral mayraamaral commented Feb 11, 2025

Problem

When the alt of an image has parentheses inside of it and previewImagesInEditor is true, the editor tries to render the image by making a GET with everything thats after the opening parentheses, e.g.:

![My alt (that has a parentheses)](my image url)

it tries to do a GET using the base url of the site + that has a parentheses)](my image url) and it results in a 404 error
Example:
http://localhost:8000/that%20has%20a%20parentheses)](my%20image%20url

Solution

in this PR i just fixed the regex that was used to match the src of an image 😄

@mayraamaral mayraamaral changed the title chore: adjust regex from previewing images to only try to render if image has bracket before of parentheses chore: adjust the regex for previewing images so that it only attempts to render if the image has a bracket immediately preceding the parentheses Feb 11, 2025
@mayraamaral
Copy link
Author

FYI @Ionaru,
I updated the actions to v4 and accidentally pushed the commit here, but I fixed it and opened this new PR: #609.

Please let me know if there’s anything else I can help with! 😄

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.

2 participants