Module:Excerpt/sandbox: Difference between revisions

Content deleted Content added
Move excerpt() to local and create entry point to match other functions
better error handling
Line 797:
hatnote[9] = ']<span> ]</span></span>' .. "''"
output[4] = require('Module:Hatnote')._hatnote(table.concat(hatnote), {selfref=true}) or err("Error generating hatnote")
end
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
local options = args -- pick up miscellaneous options: more, errors, fileargs
Line 819:
output[6] = "[[Category:" .. d.brokenCategory .. "]]"
else
output[6] = frame:preprocess(text) or err("Error processing text")
end
end