Open
Description
Problem Description
The default behavior of markdown to html is to parse image dimensions despite options.parseImgDimensions
being false
, i.e. with the default options, the following markdown is valid, and converts to the following html:

![my image2][1]
[1]: ./pic/pic1_50.png =100pxx20px
<p><img src="./pic/pic1_50.png" alt="my image" width="100px" height="20px" /></p>
<p><img src="./pic/pic1_50.png" alt="my image2" width="100px" height="20px" /></p>
The Fix
Fixing this issue requires two things in my opinion:
- In order to not break existing usage, the default should be changed to
true
both in code and in the documentation. - When the option is
false
image dimensions should be rejected
Desired behavior with parseImgDimensions
set to false
The above markdown should be rejected as valid image markdown and converted to the following html:
<p></p>
<p>![my image2][1]</p>
<p>[1]: ./pic/pic1_50.png =100pxx20px</p>
Metadata
Assignees
Labels
No labels
Activity