Module:Excerpt: Difference between revisions

Content deleted Content added
fix altText pattern, to avoid bogus file options lint errors
replace annotated links with real links before looking for links or list items
Line 510:
if not text then return err("No section " .. args["section"] .. " in page " .. page) end
end
-- replace annotated links with real links
text = mw.ustring.gsub(text, "{{%s*[Aa]nnotated[ _]link%s*|%s*(.-)%s*}}", "[[%1]]")
if func == "linked" then
for p in mw.ustring.gmatch(text, "%[%[%s*([^%]|\n]*)") do table.insert(pagenames, p) end