Module:CustomScript

--Conworlds Wiki Custom Language Conversion --http://conworld.wikia.com/ --Initial wikitext implementation by User:Flaicher --Lua conversion by User:ChickenBar --Modified for Conworlds Wiki by User:Vivaporius

local p = {}

local CharData = mw.loadData( 'Module:CustomScript/data' )

function p._mikaean( humanwords, size ) local output_string = {} local humanwords = string.lower(humanwords) local span = mw.html.create( 'span' ) if (size == nil or size == '') then size='14' end for i=1, string.len(humanwords) do       local replacement = CharData["MikaeanChar"][humanwords:sub(i,i)] if replacement ~= nil then table.insert(output_string,'') else table.insert(output_string,' ') end end span   :css( 'font-size', size..'px' ) :wikitext( table.concat(output_string) ) return tostring(span) end

function p.mikaean( frame ) local string_input = frame.args[1] local num_input = frame.args[2] return p._mikaean(string_input, num_input) end return p