Editing Module:GainLoss
From Fallen London Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 274: | Line 274: | ||
amount = mw.ustring.gsub(amount, '^[+-] *', '') | amount = mw.ustring.gsub(amount, '^[+-] *', '') | ||
-- Format discrete amounts consistently | -- Format discrete amounts consistently | ||
− | amount = mw.ustring.gsub(amount, ' [Xx]%f[%A]', ' x') | + | amount = mw.ustring.gsub(amount, '%f[%D] ?[Xx]%f[%A]', ' x') |
-- Format CP amounts consistently | -- Format CP amounts consistently | ||
if is_pyramidal then | if is_pyramidal then | ||
− | amount = mw.ustring.gsub(amount, ' [Cc][Pp]%f[%A]', ' CP') | + | amount = mw.ustring.gsub(amount, '%f[%D] ?[Cc][Pp]%f[%A]', ' CP') |
end | end | ||
end | end |