Module:User:Erutuon/08

local export = {}

local Array = require "Module:array"

-- Convert lines of tab-separated items to a table. function export.tabs_to_table(frame) local text = frame.args[1] or frame:getParent.args[1] local output = Array output:insert '{|' for line in text:gmatch '[^\n]+' do		output:insert "|-" local row = Array for item in line:gmatch '[^\t]+' do row:insert('| ' .. item) end output:insert(row:concat ' |') end output:insert '|}' output = output:concat '\n' return output end

return export