Last modified on 22 January 2018, at 19:02

Module:Qhm

Revision as of 19:02, 22 January 2018 by Ahecht (Talk) (fix corner case)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Qhm/doc

local p = {}

function p.main(frame)
	local out = mw.ustring.gsub(frame:getParent().args[1] or "","%[%[ *([%?-]) *%]%]","%1")
	out = mw.ustring.gsub(out,"%[%[ *[%?-] *| *(.-) *%]%]","%1")
	return out
end

return p