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

attrs_inline for images doesn't support % for width #1012

Open
liborjelinek opened this issue Jan 11, 2025 · 0 comments
Open

attrs_inline for images doesn't support % for width #1012

liborjelinek opened this issue Jan 11, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@liborjelinek
Copy link

What version of myst-parser are you using?

4.0.0

What version dependencies are you using?

"sphinx==8.1.3",
"myst-parser==4.0.0",
"linkify-it-py==2.0.3",
"sphinx-design==0.6.1",
"sphinx_copybutton==0.5.2",
"sphinxcontrib.mermaid==0.9.2",

What operating system are you using?

Mac

Describe the Bug

The inline attributes extension, according to its docs, should support various units for image width and height. E.g.,

![](entities.png){w=50%}

should result in <img width="50%" ...>.

But the w=50% or width=50% aren't detected by attrs_inline, and a {..} string is printed after the image:

<img alt="" src="../_images/entities.png">{w=50%}

Also, unitless like {w=50} actually produce width="50px", which might be a bug too, or it should be documented.

Expected Behavior

No response

To Reproduce

No response

@liborjelinek liborjelinek added the bug Something isn't working label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant