Fix the build.

Fix the build.

diff --git a/app/jobs/regular/pull_hotlinked_images.rb b/app/jobs/regular/pull_hotlinked_images.rb
index fd5e4b7..de8bc07 100644
--- a/app/jobs/regular/pull_hotlinked_images.rb
+++ b/app/jobs/regular/pull_hotlinked_images.rb
@@ -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 - [![alt](http://...)](http://...)
               # Markdown inline - ![alt](http://...)
diff --git a/app/services/inline_uploads.rb b/app/services/inline_uploads.rb
index 60713c5..7d80fb8 100644
--- a/app/services/inline_uploads.rb
+++ b/app/services/inline_uploads.rb
@@ -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], +"![](#{PLACEHOLDER})", $~.offset(0)[0])
       end
     end

GitHub sha: 9daed05a

2 Likes