Module:Coordinates: Difference between revisions

simplify whitespace-trimming pattern per protected edit request by User:Jackmcbarn
(avoid using global variables, and re-order the functions, per protected edit request by User:Jackmcbarn)
(simplify whitespace-trimming pattern per protected edit request by User:Jackmcbarn)
Line 213:
local factor = 1
direction = mw.ustring.direction:gsub(direction, '^[ ]*(.-)[ ]*$', '%1');
if direction == "S" or direction == "W" then
factor = -1
Anonymous user