mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 10:58:31 -05:00
FIX: properly insert images in markdown inline format
This commit is contained in:
parent
1d7df97c30
commit
54a1180140
1 changed files with 2 additions and 0 deletions
|
@ -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 a new issue