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

images with alt-text with bad spaces get eaten #3659

Open
ericscheid opened this issue Aug 22, 2024 · 0 comments
Open

images with alt-text with bad spaces get eaten #3659

ericscheid opened this issue Aug 22, 2024 · 0 comments
Labels
bug We say this works but it doesn't complicated P2 - minor feature or not urgent Minor bugs or less-popular features

Comments

@ericscheid
Copy link
Collaborator

Renderer

v3

Browser

Chrome

Operating System

MacOS

What happened?

If there are 2 or more consecutive spaces in the alt-text for an image, everything breaks. It also breaks if the alt-text either starts with or ends with a space. (This occurs with or without a {curly-inject}, and in standalone images, not just list items.)

The problem is not present with Marked v14.0.0 (or earlier). I suspect some side effect from HB's variables code.

image

Code

# Bug with alt-text image

{{note
If there are 2 or more consecutive spaces in the alt-text for an image, everything breaks. It also breaks if the alt-text either starts with or ends with a space.
}}

1. ![ where is my image??](http://i.imgur.com/hMna6G0.png)
2. ![where  is my image??](http://i.imgur.com/hMna6G0.png)
3. ![where is my image?? ](http://i.imgur.com/hMna6G0.png)
4. ![where is my image??](http://i.imgur.com/hMna6G0.png){height=20%,width=20%}
@ericscheid ericscheid added bug We say this works but it doesn't complicated P2 - minor feature or not urgent Minor bugs or less-popular features labels Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We say this works but it doesn't complicated P2 - minor feature or not urgent Minor bugs or less-popular features
Projects
None yet
Development

No branches or pull requests

1 participant