Module:Section link/sandbox: Difference between revisions

Content deleted Content added
Recognize anchor in page name
simplify anchor detection
Line 126:
-- Extract section from page, if present
if page then
local sp, ns = mw.ustring.gsublink:match(page,"'^(.-)%#(.*","%1")$')
if n > 0a then
page = p
sections[1] = mw.ustring.gsub(page,"^.-%#(.*)","%1")
pagesections[1] = s
end
end