sizespec = ''
if 'width' in i.attrib:
- sizespec = ' style="width: {}"'.format(i.attrib['width'])
+ sizespec = ' style="width: {};"'.format(i.attrib['width'])
elif 'height' in i.attrib:
- sizespec = ' style="height: {}"'.format(i.attrib['height'])
+ sizespec = ' style="height: {};"'.format(i.attrib['height'])
caption = i.text
if caption:
<h1>
My Project
</h1>
-<p>Image:</p><img class="m-image" src="tiny.png" alt="Image" /><p>Figure:</p><figure class="m-figure"><img src="tiny.png" alt="Image" /><figcaption>Caption</figcaption></figure><p>Explicit width:</p><img class="m-image" src="tiny.png" alt="Image" style="width: 128px" /><p>Explicit height and a caption:</p><figure class="m-figure"><img src="tiny.png" alt="Image" style="height: 64px" /><figcaption>This is 64 pixels high.</figcaption></figure>
+<p>Image:</p><img class="m-image" src="tiny.png" alt="Image" /><p>Figure:</p><figure class="m-figure"><img src="tiny.png" alt="Image" /><figcaption>Caption</figcaption></figure><p>Explicit width:</p><img class="m-image" src="tiny.png" alt="Image" style="width: 128px;" /><p>Explicit height and a caption:</p><figure class="m-figure"><img src="tiny.png" alt="Image" style="height: 64px;" /><figcaption>This is 64 pixels high.</figcaption></figure>
</div>
</div>
</div>