Removed debug prints
This commit is contained in:
parent
ca62b059e6
commit
a491765d59
|
@ -543,7 +543,6 @@ local curb = require 'curb_your_enthusiasm'
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
local function is_image_link (str)
|
local function is_image_link (str)
|
||||||
print(str)
|
|
||||||
if str:match '%.png$' or str:match '%.gif$' or str:match '%.jpg$' then
|
if str:match '%.png$' or str:match '%.gif$' or str:match '%.jpg$' then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
@ -551,7 +550,6 @@ local function is_image_link (str)
|
||||||
if type(str) ~= 'string' then return false end
|
if type(str) ~= 'string' then return false end
|
||||||
if not str:match '^%a+://.+$' then return false end
|
if not str:match '^%a+://.+$' then return false end
|
||||||
local headers = internet.download_headers(str)
|
local headers = internet.download_headers(str)
|
||||||
print(headers)
|
|
||||||
return type(headers) == 'table' and headers['content-type']:match '^image/%a+$'
|
return type(headers) == 'table' and headers['content-type']:match '^image/%a+$'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user