Jump to content

Module:User:Wyang/cmn-no-yue

From Wiktionary, the free dictionary


local export = {}

function export.filter(frame)
	local output_text = {}
	local m_data = mw.loadData("Module:User:Wyang/cmn-no-yue/data").list
	for _, data in ipairs(m_data) do
		local content = mw.title.new(data[1]):getContent()
		if content then
			if mw.ustring.match(content, "{{zh%-pron") and not mw.ustring.match(content, "|c=") then
				table.insert(output_text, "# <span class=\"Hani\">[[" .. data[1] .. "]]</span> (" .. data[2] .. ")")
			end
		end
	end
	return table.concat(output_text, "\n")
end

return export