Content deleted Content added
Sophivorus (talk | contribs) Rename a few more variables. Getting ready to split abstract functions from template-specific functions |
Sophivorus (talk | contribs) Merging the new fragment transclusion functionality into the new excerpt function |
||
Line 799:
output[5] = '<' .. tag .. ' class="excerpt">\n'
if article ~= '{{{1}}}' then
if is(args.fragment) then▼
output[6] = frame:callParserFunction( '#lst', article, args.fragment) or err("Error transcluding text")▼
else
▲ output[6] = frame:
▲ local options = args -- pick up miscellaneous options: more, errors, fileargs
▲ options.paraflags = numberFlags(args.paragraphs or "") -- parse paragraphs, e.g. "1,3-5" → {"1","3-5"}
▲ options.fileflags = numberFlags(args.files or "1") -- parse file numbers
▲ options.nobold = 1
▲ options.keepTables = is(args.tables) and args.tables or 1
▲ options.keepRefs = is(args.references) and args.references or 1
▲ options.keepSubsections = is(args.subsections) and args.subsections or ""
▲ if options.more and options.more == "" then options.more = "Read more..." end -- more= is short for this default text
▲ local pageNames = { (article .. '#' .. (section or '')) }
▲ local text = main(pageNames, options)
▲ if text == "" and d.brokenCategory and d.brokenCategory ~= "" and mw.title.getCurrentTitle().isContentPage then
▲ output[6] = "[[Category:" .. d.brokenCategory .. "]]"
end
else
|