Module:Excerpt: Difference between revisions

Content deleted Content added
remove DIY hatnote indented with a colon
Extract a section when processing a redirect to Page#Section. (Pending change in sandbox not promoted yet.)
Line 461:
local isStub = mw.ustring.find(text, "%s*{{[^{|}]*%-[Ss]tub%s*}}")
if isStub then text = nil end
end
if not section then
section = mw.ustring.match(pagename, ".-#(.*)") -- parse redirect to Page#Section
end
if text and section then text = getsection(text, section) end