all repos — hastyscribe @ 5470236e05363eb5eff4c7c55ca7a2be405348a6

A professional markdown compiler.

Merge pull request #23 from ap0state/bugfix

Fixed MIME type truncation on embedded images
Fabio Cevasco h3rald@h3rald.com
Tue, 14 Oct 2014 22:00:00 +0200
commit

5470236e05363eb5eff4c7c55ca7a2be405348a6

parent

56286c40eaae58c3a5edd3d4fbdab1be1995b5f9

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

jump to
M hastyscribe.nimhastyscribe.nim

@@ -82,7 +82,7 @@ var matches:TImgTagStart

discard img.match(img_peg, matches) let imgfile = matches[0] if imgfile.startsWith(peg"'data:'"): continue - let pegimgformat = peg"'.' i'png' / i'jpg' / i'jpeg' / i'gif' / i'svg' / i'bmp' / i'webp' @$" + let pegimgformat = peg"'.' i'' / i'png' / i'jpg' / i'jpeg' / i'gif' / i'svg' / i'bmp' / i'webp' @$" let imgformat = imgfile.substr(imgfile.find(pegimgformat)+1, imgfile.len-1) let imgcontent = encode_image_file(current_dir & imgfile, imgformat) let imgrep = img.replace("\"" & img_file & "\"", "\"" & imgcontent & "\"")