Module:category link/templates

From Wiktionary, the free dictionary
Jump to navigation Jump to search

This module implements {{category}}.


-- Prevent substitution.
if mw.isSubsting() then
	return require("Module:unsubst")
end

local make_link = require("Module:category link").make_link
local process_params = require("Module:parameters").process

local export = {}

function export.category_t(frame)
	return make_link(unpack(process_params(frame:getParent().args, {
		[1] = {required = true, allow_empty = true, no_trim = true},
		[2] = {allow_empty = true, no_trim = true},
	})))
end

return export