mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 01:22:36 +08:00
FIX: properly insert images in markdown inline format (take 2)
This commit is contained in:
parent
6c6a7755ae
commit
929730c008
|
@ -65,6 +65,8 @@ module Jobs
|
|||
raw.gsub!(/!\[([^\]]*)\]\(#{escaped_src}\)/) { "![#{$1}](#{url})" }
|
||||
# Markdown inline - ![](http://... "image title")
|
||||
raw.gsub!(/!\[\]\(#{escaped_src} "([^\]]*)"\)/) { "![](#{url})" }
|
||||
# Markdown inline - ![alt](http://... "image title")
|
||||
raw.gsub!(/!\[([^\]]*)\]\(#{escaped_src} "([^\]]*)"\)/) { "![](#{url})" }
|
||||
# Markdown reference - [x]: http://
|
||||
raw.gsub!(/\[([^\]]+)\]:\s?#{escaped_src}/) { "[#{$1}]: #{url}" }
|
||||
# Direct link
|
||||
|
|
Loading…
Reference in New Issue
Block a user