Merge "Simplify mw.text.listToText"

This commit is contained in:
jenkins-bot 2014-07-14 17:08:29 +00:00 committed by Gerrit Code Review
commit 160770ae3e

View file

@ -240,10 +240,7 @@ function mwtext.listToText( list, separator, conjunction )
local ret local ret
if n > 1 then if n > 1 then
local tmp = list[n-1] ret = table.concat( list, separator, 1, n - 1 ) .. conjunction .. list[n]
list[n-1] = list[n-1] .. conjunction .. list[n]
ret = table.concat( list, separator, 1, n - 1 )
list[n-1] = tmp
else else
ret = tostring( list[1] or '' ) ret = tostring( list[1] or '' )
end end