Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Module:Check if redirect targets section

From Wikipedia, the free encyclopedia

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