Jump to content

Module:la-verb/testcases/data

From Wiktionary, the free dictionary


local Array = require "Module:array"

local function get_tab_separated_words(text)
	local res = Array()
	for line in text:gmatch '[^\n]+' do
		local words = Array()
		res:insert(words)
		for word in line:gmatch '[^\t]+' do
			words:insert(word)
		end
	end
	return res
end

return get_tab_separated_words(
	mw.title.new 'User:Erutuon/Latin verb stems':getContent()
		:match '<pre><nowiki>(.-)</nowiki></pre>')