FIX: properly insert images in markdown inline format
This commit is contained in:
parent
1d7df97c30
commit
54a1180140
|
@ -63,6 +63,8 @@ module Jobs
|
||||||
raw.gsub!(/\[!\[([^\]]*)\]\(#{escaped_src}\)\]/) { "[<img src='#{url}' alt='#{$1}'>]" }
|
raw.gsub!(/\[!\[([^\]]*)\]\(#{escaped_src}\)\]/) { "[<img src='#{url}' alt='#{$1}'>]" }
|
||||||
# Markdown inline - ![alt](http://...)
|
# Markdown inline - ![alt](http://...)
|
||||||
raw.gsub!(/!\[([^\]]*)\]\(#{escaped_src}\)/) { "![#{$1}](#{url})" }
|
raw.gsub!(/!\[([^\]]*)\]\(#{escaped_src}\)/) { "![#{$1}](#{url})" }
|
||||||
|
# Markdown inline - ![](http://... "image title")
|
||||||
|
raw.gsub!(/!\[\]\(#{escaped_src} "([^\]]*)"\)/) { "![](#{url})" }
|
||||||
# Markdown reference - [x]: http://
|
# Markdown reference - [x]: http://
|
||||||
raw.gsub!(/\[([^\]]+)\]:\s?#{escaped_src}/) { "[#{$1}]: #{url}" }
|
raw.gsub!(/\[([^\]]+)\]:\s?#{escaped_src}/) { "[#{$1}]: #{url}" }
|
||||||
# Direct link
|
# Direct link
|
||||||
|
|
Loading…
Reference in New Issue