mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 03:19:10 +00:00
Fix the build.
This commit is contained in:
parent
7a0d031bc4
commit
9daed05ad0
@ -105,7 +105,7 @@ module Jobs
|
||||
InlineUploads.match_img(raw, external_src: true, &replace_raw)
|
||||
|
||||
# BBCode tag - [img]http://...[/img]
|
||||
InlineUploads.match_bbcode_img(raw, &replace_raw)
|
||||
InlineUploads.match_bbcode_img(raw, external_src: true, &replace_raw)
|
||||
|
||||
# Markdown linked image - [](http://...)
|
||||
# Markdown inline - 
|
||||
|
@ -164,9 +164,9 @@ class InlineUploads
|
||||
end
|
||||
end
|
||||
|
||||
def self.match_bbcode_img(markdown)
|
||||
def self.match_bbcode_img(markdown, external_src: false)
|
||||
markdown.scan(/(\[img\]\s?(.+)\s?\[\/img\])/) do |match|
|
||||
if matched_uploads(match[1]).present? && block_given?
|
||||
if (matched_uploads(match[1]).present? && block_given?) || external_src
|
||||
yield(match[0], match[1], +"", $~.offset(0)[0])
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user