10,735
edits
TheNightAvl (talk | contribs) (Created page with "local export = {} local getArgs = require("Module:Arguments").getArgs local m_languages = require("Module:languages") function export.format(frame) local args = getArgs(frame) local current = mw.title.makeTitle("", args["entry"] or "") or mw.title.getCurrentTitle() local language = m_languages.get_by_code(args[1]) local content = current:getContent() content = mw.ustring.match(content, "(==%s*" .. language.name .. "%s*==.+)\n==[^=]+==\n") or mw.ustring.match(...") |
TheNightAvl (talk | contribs) No edit summary |
||
Line 30: | Line 30: | ||
end | end | ||
if etymology_i > 2 then --if already set up for multiple etymologies | if args[2] == "format" then --if just wanting to format | ||
return content | |||
elseif etymology_i > 2 then --if already set up for multiple etymologies | |||
return content .. "\n\n=== {{Etymology|" .. language.code .. "|" .. etymology_i .. "}} ===" | return content .. "\n\n=== {{Etymology|" .. language.code .. "|" .. etymology_i .. "}} ===" | ||
end | end | ||