Module:Convert/makeunits: Difference between revisions

Content deleted Content added
something (mw.text.nowiki?) is only preserving the first tab character on each line and is misaligning the second tab, so use spaces second tab for less ugly result
don't link a name if it already is linked (for handlk)
Line 742:
-- Result has leading/trailing whitespace removed, and is nil if empty
-- or if link matches the name, if a name is specified.
-- Exception: If the link is empty and the name starts with '[[',
-- the link is stored as '' (for a unit name which is always linked).
-- If the resulting link is nil, no link field is stored, and
-- if a link is required, it will be set from the unit's name.
if empty(link) then
return (name:sub(1, 2) == '[[') and '' or nil
end
local prefixes = { ['+'] = 1, ['*'] = 2, ['@'] = 3 }