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:Sandbox/Ahecht/trim date

From Wikipedia, the free encyclopedia
local p = {}

function p.trim(frame)
	local date = frame:getParent().args[1]
	if date == nil then date = frame.args[1] end
	if date == nil then date = "123" end
	date = string.gsub( date, "%lt;", "<" )
	date = string.gsub( date, "%gt;", ">" )
	date = string.gsub( date, "\'\"`", "<" )
	date = string.gsub( date, "\`\"'", ">" )
	date = string.gsub( date, "<.-mw%-formatted%-date.->", "" )
	date = string.gsub( date, "<.-nowiki.->", "" )
	date = string.gsub( date, "<.*>", "" )
	return date
end

return p