Content deleted Content added
Sophivorus (talk | contribs) mNo edit summary |
Sophivorus (talk | contribs) Replace hand-made <section> parsing for a call to #lst as the hand-made version continues to cause problems |
||
Line 493:
text = mw.ustring.gsub(text, "^.-<[Oo][Nn][Ll][Yy][Ii][Nn][Cc][Ll][Uu][Dd][Ee]>", "") -- remove text before first onlyinclude section
text = mw.ustring.gsub(text, "</[Oo][Nn][Ll][Yy][Ii][Nn][Cc][Ll][Uu][Dd][Ee]>.*", "") -- remove text after last onlyinclude section
end▼
if is(options.fragment) then▼
end
if not is(options.keepSubsections) then
Line 597 ⟶ 582:
pageName = pn or pageName
text, normalisedPageName = getContent(pageName)
local frame = mw.getCurrentFrame()
text = frame:callParserFunction('#lst', normalisedPageName, options.fragment)
if not normalisedPageName then
return err("No title for page name " .. pageName)
|