11,201
edits
TheNightAvl (talk | contribs) No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
Line 10: | Line 10: | ||
function format_gender(gender) | function format_gender(gender) | ||
local temp = gender | local temp = gender | ||
for code in string.gmatch(gender, " | for code in string.gmatch(gender, "[a-z]+") do | ||
gender_obj = assert(available_genders[code], "Invalid gender code detected") | gender_obj = assert(available_genders[code], "Invalid gender code detected") | ||
temp = string.gsub(temp, code, '<abbr title="' .. gender_obj.hint .. '">' .. gender_obj.label .. "</abbr>") | temp = string.gsub(temp, code, '<abbr title="' .. gender_obj.hint .. '">' .. gender_obj.label .. "</abbr>") |