all repos — hastyscribe @ b9b6fa4ece69ad6df329d6ceff9571df732ee103

A professional markdown compiler.

Fixed #65, #66, #67, #68.
h3rald h3rald@h3rald.com
Sun, 07 Oct 2018 18:33:31 +0200
commit

b9b6fa4ece69ad6df329d6ceff9571df732ee103

parent

00f98d37cd084c3ddd54372e5cae28294630cf7d

1 files changed, 4 insertions(+), 2 deletions(-)

jump to
M hastyscribe.nimhastyscribe.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)