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
if n > 1 then
local tmp = list[n-1]
list[n-1] = list[n-1] .. conjunction .. list[n]
ret = table.concat( list, separator, 1, n - 1 )
list[n-1] = tmp
ret = table.concat( list, separator, 1, n - 1 ) .. conjunction .. list[n]
else
ret = tostring( list[1] or '' )
end