Merge pull request #4431 from techAPJ/pull-images

FIX: properly insert images in markdown inline format
This commit is contained in:
Arpit Jalan 2016-09-01 12:23:48 +05:30 committed by GitHub
commit 6c6a7755ae

View file

@ -63,6 +63,8 @@ module Jobs
raw.gsub!(/\[!\[([^\]]*)\]\(#{escaped_src}\)\]/) { "[<img src='#{url}' alt='#{$1}'>]" }
# Markdown inline - ![alt](http://...)
raw.gsub!(/!\[([^\]]*)\]\(#{escaped_src}\)/) { "![#{$1}](#{url})" }
# Markdown inline - ![](http://... "image title")
raw.gsub!(/!\[\]\(#{escaped_src} "([^\]]*)"\)/) { "![](#{url})" }
# Markdown reference - [x]: http://
raw.gsub!(/\[([^\]]+)\]:\s?#{escaped_src}/) { "[#{$1}]: #{url}" }
# Direct link