Module:FeaturedSnippet: Difference between revisions

>Manikanta
No edit summary
 
Created page with "local p = {} function p.render(frame) local out = {} local args = frame:getParent().args local snippets = { args["snippet"], args["snippet2"], args["snippet3"] } -- Add provided snippets for _, snippet in ipairs(snippets) do if snippet and snippet ~= "" then table.insert(out, '<p>' .. mw.text.encode(snippet) .. '</p>') end end -- Fallback to first paragraph if no snippets if #out == 0 then local content = mw.title.getCurrentTitle():getContent(..."
(No difference)