Content deleted Content added
Avoid turning | into {{!}} due to fear of processing errors - gallery is quite robust and Random slideshow now provides a much more logical response |
shuffle around |
||
(5 intermediate revisions by the same user not shown) | |||
Line 110:
return frame:preprocess(t)
end
-- else
return mw.ustring.gsub(t, '\n*', '')
end
Line 117:
-- strip galleries
excerpt = mw.ustring.gsub(excerpt, "<%s*[Gg]allery.->.-<%s*/%s*[Gg]allery%s*>", "")
-- strip tables and block templates; strip newlines
excerpt = mw.ustring.gsub(excerpt..'\n', '\n?%b{}\n?', processBraces)
-- replace wikitext bulleted lists with html bulleted lists
Line 170:
options.paraflags = excerptModule.numberFlags(args.paragraphs or "") -- parse paragraphs, e.g. "1,3-5" → {"1","3-5"}
options.fileflags = excerptModule.numberFlags(args.files or "") -- parse file numbers
options.ignoreOnlyincludes = options.ignoreOnlyincludes == nil and true or options.ignoreOnlyincludes -- default to true
if args.nostubs and isDeclined(args.nostubs) then
options.nostubs = false
Line 203 ⟶ 204:
-- begin BHG addition for tracking source pages
local thisPage = mw.title.getCurrentTitle().nsText .. ":" .. mw.title.getCurrentTitle().text
thisPage = thisPage:gsub('_', ' ') -- fix the nsText part, until [[phab:T369784]] is resolved
local thisBareParam = mw.ustring.gsub(args[ii], "^([^#]+).*$", "%1", 1) -- strip any section anchor from the parameter's page name
thisBareParam = thisBareParam:gsub('_', ' ') -- support underscores in parameter's page name
if (thisPage == thisBareParam) then
usesEmbeddedList = true;
|