-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Option parseImgDimensions
is actually true
by default despite doc, and also, when false
still behaves as if true
#984
Comments
@paviad In my opinion the desired behaviour with <p>![my image](./pic/pic1_50.png =100pxx20px)</p>
<p>![my image2][1]</p>
<p>[1]: ./pic/pic1_50.png =100pxx20px</p> It should rather just omit the dimensions and fill in the html with proper values while leaving the dimension attributes, like the following: <p><img src="./pic/pic1_50.png" alt="my image" /></p>
<p><img src="./pic/pic1_50.png" alt="my image2" /></p> Because the important point to note here is that if we're setting Note, we still want the image to be displayed but, not with the dimension attributes. And the fix you've provided here #985 (which is highly appreciated) does not let the image render rather it just puts the markdown syntax in its place which is not the desired behaviour of a markdown to html converter. I hope you'll look into it and you'll try to come up with a different approach. |
It is definitely a viable alternative to my design - I can make it so. |
Problem Description
The default behavior of markdown to html is to parse image dimensions despite
options.parseImgDimensions
beingfalse
, i.e. with the default options, the following markdown is valid, and converts to the following html:The Fix
Fixing this issue requires two things in my opinion:
true
both in code and in the documentation.false
image dimensions should be rejectedDesired behavior with
parseImgDimensions
set tofalse
The above markdown should be rejected as valid image markdown and converted to the following html:
The text was updated successfully, but these errors were encountered: