Module:linkeach: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 18: Line 18:
local words = {}
local words = {}
sep = sep or " "
for word in mw.ustring.gmatch(str, "(%S+)") do
for word in mw.ustring.gmatch(str, "(%S+)") do
word = "[[Contionary:" .. mw.ustring.lower(word) .. "|" .. word .. "]]"
word = "[[" .. mw.ustring.lower(word) .. "|" .. word .. "]]"
table.insert(words, word)
table.insert(words, word)
end
end
return words
return table.concat(words, " ")
end
end