Content deleted Content added
Sophivorus (talk | contribs) Change the style of the fragment capturing so that we can detect broken fragments |
Sophivorus (talk | contribs) Escape special characters in fragment names |
||
Line 493:
end
if not falsy(options.fragment) then
local escapedFragment = mw.ustring.gsub( options.fragment, "[%^%$%(%)%%%.%[%]%*%+%-%?]", "%%%0" )
local fragments = ""
local fragment = ""
local position = 1
while position < mw.ustring.len( text ) do
fragment, position = mw.ustring.match(text, "<%s*[Ss]ection%s+begin%s*=%s*[\"\']?%s*" ..
if fragment and position then
fragments = fragments .. fragment
|