Module:User:Tc14Hd/IPA Table Module

local export = {}

function export.process(frame)

-- get wikitext of table local text = frame.args[1] -- background color of empty cells local background_color = "#E6E6E6" -- add background color to empty cells text = text:gsub("(| +)-", "%1 " .. ' style="background: ' .. background_color .. ';" | &mdash;') -- convert to IPA text = text:gsub("([^<]+)", '%1 %2 %3') -- correct links text = text:gsub(		"(%[%[([^%]]+)%]%])",		function(link, link_text)			if link_text:find("'''") and not link_text:find("|") then				return "" .. link_text .. ""			else				return link			end		end) -- return modified table return require "Module:debug".highlight_dump(text) end

return export