10,731
edits
TheNightAvl (talk | contribs) No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
Line 12: | Line 12: | ||
local content = current:getContent() | local content = current:getContent() | ||
content = mw.ustring.match(content, "(==%s*" .. language.name .. "%s*==.+)\n==[^=]+==\n") or mw.ustring.match(content, "==%s*" .. language.name .. "%s*==.+") | content = assert(mw.ustring.match(content, "(==%s*" .. language.name .. "%s*==.+)\n==[^=]+==\n") or mw.ustring.match(content, "==%s*" .. language.name .. "%s*==.+"), "No " .. language.name .. " section found in:\n" .. content) | ||
local etymology_i = 1 | local etymology_i = 1 | ||
Line 86: | Line 86: | ||
if section.pre then section.pre = mw.ustring.gsub(section.pre, "===", "====") end | if section.pre then section.pre = mw.ustring.gsub(section.pre, "===", "====") end | ||
section.main = mw.ustring.gsub(section.main, "===", "====") | section.main = mw.ustring.gsub(section.main, "===", "====") | ||
return section.heading .. (section.pronunciation or "") .. section.etymology .. (section.pre or "") .. section.main .. "\n\n=== {{Etymology|" .. language.code .. "|2}} ===" | return section.heading .. (section.pronunciation or "") .. section.etymology .. (section.pre or "") .. section.main .. "\n\n=== {{Etymology|" .. language.code .. "|2}} ===" |