Module:Check if redirect targets section

local p = {}

function p._run(page)
	if not page or page == "" then return "false" end
	title = mw.title.new(page)
	if not title then return "false" end
	
    local content =  title:getContent()
    if content and mw.ustring.find(content, "%[%[[^#]*#[^%]]+%]%]") then
        return "true"
    end
    return "false"
end

function p.run(frame)
	return p._run(frame.args[1])
end

return p