-
Notifications
You must be signed in to change notification settings - Fork 94
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
Support specifying a single dimension #9
Comments
Hi @sloria, Actually, your request is already supported. You can specify the size only for width or height by: ![test1](image.png =100x)
![test2](image.png =x100) They will be rendered as: <img src="image.png" alt="test1" width="100"/>
<img src="image2.png" alt="test2" height="100"/> |
@tatsy Ah, didn't realize you could leave out a dimension like that. I still think that |
Hi @sloria, I think the specification This plugin is designed to follow the GitHub-flavored Markdown, therefore, the functions, which are not supported by it, should not be included in this plugin. |
@tatsy Ah, I didn't realize this plugin's syntax was following a specification. Which specification does this project follow? GitHub-flavored Markdown does not support this syntax. As of this writing, the only way to size images in GFM is to use an |
The image sizing syntax is listed in one of the Deployed Extensions for Commonmark, but it doesn't specify how to define a single dimension. The syntax I'm proposing was also proposed in the Commonmark forum here: https://talk.commonmark.org/t/support-for-image-dimensions/148/7 . |
Hi @sloria, Thank you for sharing the links. But these links indicate that people proposed the new syntax but it is not officially supported. I think this is because the syntax Accordingly, GitHub-flavored Markdown supports the syntax only |
The proposed syntax is especially convenient when using percentages.
I understand it's more ambiguous when using pixels, but as a user, I would assume Btw, I haven't been able to get |
Hi @sloria, I am sorry for my misunderstanding. You're right. The GitHub-flavored Markdown does not support the above features. The syntax I remembered that I adopted this syntax because this one is simple and intuitive, also it was easy to support. For example, Pandoc supports the syntax like Despite the fact that the many Markdown parsers do not support the syntax that this plugin supports, I am still against to support the syntax In conclusion, I think there is not enough justification to support the syntax that you have proposed. However, I am still open to your opinion. Please feel free to tell me your further opinion. Thank you. |
Users should be allowed to pass a single dimension, which is assumed to be the width. We let the browser maintain the aspect ratio for the height.
The text was updated successfully, but these errors were encountered: