Set the maxwidth for images (fix #48)
It didn't look pretty when images where larger than the viewport, and it "broke" word wrap (because it stretched the phantom, and hence lines wrapped further, see #34) Sublime Text's minihtml only supports width and height attributes on img tags, therefore, we have to determine the aspect ratio of the images ourselves if we want to set a maxsize (so that we can set the height). We use a hacky function copy pasted from stackoverflow to determine the size of common format of images using std lib python.
This commit is contained in: