mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge pull request #4431 from techAPJ/pull-images
FIX: properly insert images in markdown inline format
This commit is contained in:
commit
6c6a7755ae
@ -63,6 +63,8 @@ module Jobs
|
||||
raw.gsub!(/\[!\[([^\]]*)\]\(#{escaped_src}\)\]/) { "[<img src='#{url}' alt='#{$1}'>]" }
|
||||
# Markdown inline - 
|
||||
raw.gsub!(/!\[([^\]]*)\]\(#{escaped_src}\)/) { "" }
|
||||
# Markdown inline - 
|
||||
raw.gsub!(/!\[\]\(#{escaped_src} "([^\]]*)"\)/) { "" }
|
||||
# Markdown reference - [x]: http://
|
||||
raw.gsub!(/\[([^\]]+)\]:\s?#{escaped_src}/) { "[#{$1}]: #{url}" }
|
||||
# Direct link
|
||||
|
Loading…
Reference in New Issue
Block a user