Content deleted Content added
Sophivorus (talk | contribs) Improve fragment transclusion so that multiple fragments with the same name are transcluded |
Sophivorus (talk | contribs) Change the style of the fragment capturing so that we can detect broken fragments |
||
Line 493:
end
if not falsy(options.fragment) then
local fragments = ""
text = mw.ustring.gsub(text, "<%s*[Ss]ection%s+end=%s*[\"\']?%s*" .. options.fragment .. "%s*[\"\']?%s*/>.-<%s*[Ss]ection%s+begin%s*=%s*[\"\']?%s*" .. options.fragment .. "%s*[\"\']?%s*/>", "") -- remove text between <sections>▼
local fragment = ""
local position = 1
while position < mw.ustring.len( text ) do
▲
if fragment and position then
fragments = fragments .. fragment
else
position = mw.ustring.len( text )
end
end
text = fragments
end
if falsy(options.keepSubsections) then
|