10,735
edits
TheNightAvl (talk | contribs) No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
Line 49: | Line 49: | ||
while mw.ustring.find(content, "\n===[^=]+===\n.+", check_init) do | while mw.ustring.find(content, "\n===[^=]+===\n.+", check_init) do | ||
local match_start, _, section_check = mw.ustring.find(content, "\n(===[^=]+===\n.+)", check_init) | local match_start, _, section_check = mw.ustring.find(content, "\n(===[^=]+===\n.+)", check_init) | ||
if mw.ustring.find(frame:preprocess(section_check), "^===[^=]+=== | if mw.ustring.find(frame:preprocess(section_check), "^===[^=]+===%s+<strong class=\"headword\"") then | ||
index.m1, section.main = mw.ustring.find(content, section_check, check_init, true), section_check | index.m1, section.main = mw.ustring.find(content, section_check, check_init, true), section_check | ||
break | break | ||
Line 56: | Line 56: | ||
end | end | ||
end | end | ||
if section.main == nil then error("Could not locate head template in:\n" .. | if section.main == nil then error("Could not locate head template in:\n" .. content) end | ||