mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
fix onebox for your own site
This commit is contained in:
@@ -20,6 +20,7 @@ module Oneboxer
|
||||
# Return a oneboxer for a given URL
|
||||
def self.onebox_for_url(url)
|
||||
matchers.each do |regexp, oneboxer|
|
||||
regexp = regexp.call if regexp.class == Proc
|
||||
return oneboxer.new(url) if url =~ regexp
|
||||
end
|
||||
nil
|
||||
|
||||
Reference in New Issue
Block a user