Fixed #65, #66, #67, #68.
h3rald h3rald@h3rald.com
Sun, 07 Oct 2018 18:33:31 +0200
1 files changed,
4 insertions(+),
2 deletions(-)
jump to
M
hastyscribe.nim
→
hastyscribe.nim
@@ -113,11 +113,13 @@ for img in findAll(hs.document, peg_img):
var matches:TImgTagStart discard img.match(peg_img, matches) let imgfile = matches[0] - let imgformat = imgfile.image_format + var imgformat = imgfile.image_format + if imgformat == "svg": + imgformat = "svg+xml" var imgcontent = "" if imgfile.startsWith(peg"'data:'"): continue - elif imgfile.startsWith(peg"http[s]?'://'"): + elif imgfile.startsWith(peg"'http' 's'? '://'"): try: let client = newHttpClient() imgcontent = encode_image(client.getContent(imgfile), imgformat)