45,647
edits
No edit summary |
No edit summary |
||
Line 14: | Line 14: | ||
return table.concat(words, sep) | return table.concat(words, sep) | ||
end | end | ||
function export.exist(frame) | |||
local args = frame.args | |||
local str = args[1]; local words = {} | |||
local sep = args[2] or " " | |||
for word in mw.ustring.gmatch(str, "(%S+)") do | |||
if mw.title.new(word, 'Contionary').exists == true then | |||
word = "[[Contionary:" .. mw.ustring.lower(word) .. "|" .. word .. "]]" | |||
table.insert(words, word) | |||
end | |||
end | |||
return table.concat(words, sep) | |||
end | |||
return export | return export |