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

Incorrect parsing of images with parentheses in URL #1007

Open
polterguy opened this issue May 9, 2024 · 0 comments
Open

Incorrect parsing of images with parentheses in URL #1007

polterguy opened this issue May 9, 2024 · 0 comments

Comments

@polterguy
Copy link

polterguy commented May 9, 2024

Sometimes image URLs contains parenthesis such as follows.

![Image A whale's tail out of the water with snowy mountains in the background in Juneau](https://www.travelandleisure.com/thmb/rBEDe9bXdm41kFdrXr6GxkXK0fI=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/TAL-Whale-ALASKAUPDATE0323-7bbad6b4e1914d748074ebd3b6673273.jpg)

I realise that these can be displayed by escaping the parentheses such as for instance \(, but that is not an option, since sometimes I display markdown I'm not in control over myself. Technically it should be able to count opening / closing parentheses during parsing, and only close the URL part once it's back to zero, implying having a counter for each opening parentheses incrementing the count, and decrementing when you see an end parentheses, for then to only close the URL once it returns back to zero.

This could be a configuration, to avoid backward compatibility issues - And it might be a configuration already for all I know, however how do you suggest I solve this, if it can be solved?

I am willing to provide a patch if you're interested, but this is a problem I must solve - "marked" Angular component for instance handles this "correctly" ...

Psst, other parsers will display these correctly, which creates the problem I assume - See screenshots for examples which are taken from "marked" ...

Screenshot 2024-05-09 at 10 06 57 AM Screenshot 2024-05-09 at 10 07 05 AM
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

No branches or pull requests

1 participant