Content deleted Content added
Sophivorus (talk | contribs) Add option to excerpt a fragment wrapped with <section> tags. Also change cleanupText so that it takes a single table of parameters |
Sophivorus (talk | contribs) Improve fragment transclusion so that multiple fragments with the same name are transcluded |
||
Line 493:
end
if not falsy(options.fragment) then
text = mw.ustring.gsub(text, "^.-<%s*[Ss]ection%s+begin=%s*[\"\']?%s*" .. options.fragment .. "%s*[\"\']?%s*/>", "") -- remove text before first <section>
text = mw.ustring.gsub(text, "<%s*[Ss]ection%s+end=%s*[\"\']?%s*" .. options.fragment .. "%s*[\"\']?%s*/>.*", "") -- remove text after last <section>
end
if falsy(options.keepSubsections) then
|