Module:Param Parse: Difference between revisions

Fix image function bug for nil images
mNo edit summary
(Fix image function bug for nil images)
 
(One intermediate revision by the same user not shown)
Line 66:
function parse.image_name(img)
if img then
return string.match(img, '%[%[(File:(.+%.%w%w%w)|?%d*x?%d*p?x?%]%]')
end
return nil
Line 94:
size = '|x'..height..'px'
end
if imgname then
return '[['..name..size..']]'
end