Jump to content

Module:Bopomofo spacing

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Remsense (talk | contribs) at 15:59, 16 April 2024. The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

require('strict')
local p = {}

function p._main(frame)
	local root = mw.html.create()
	local pad = '<span style="padding-left:0.5ic;">&nbsp;</span>'
	local result = '<span lang="zh-Bopo">'
	for k,v in pairs(frame) do
		if k > 1 then
			result = result .. pad
		end
		result = result .. v
	end
	result = result .. '</span>'
	return result
end

function p.main(frame)
	local getArgs = require('Module:Arguments').getArgs
	return p._main(getArgs(frame))
end

return p