Module:User:Erutuon/02

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


local export = {}

local function get_all_matches(str, pattern)
	local matches = require 'Module:array'()
	for match in str:gmatch(pattern) do
		matches:insert(match)
	end
	return matches
end

function export.show(frame)
	local content = frame.args[1]
	local code = frame.args[2]
	
	if not content then
		content = mw.title.new 'User:Jberkel/lists/wanted/20190401/grc/data':getContent()
			:match '^%s*<pre><nowiki>(.-)</nowiki></pre>%s*$'
	end
	
	return require "Module:User:Jberkel/sandbox".generate_table(content, code)
end

return export