Module:Sandbox/N8wilson/Section Explained

-- Module to create selectively transcluded sections

require('strict')

local p =

-- create a LST section by wrapping "body" with

and
tagsfunction p.create_wrapped(frame) local sectionlabel = frame.args['label'] or frame.args['1'] or local sectioncontent = frame.args['body'] or frame.args['2'] or

-- If no label return text without section wrapping if(sectionlabel

) then return sectioncontent end

local base = mw.html.create base = base:tag('span') base:tag('section',) :attr('begin', sectionlabel)

base:wikitext(sectioncontent)

base:tag('br',) base:tag('section',) :attr('end', sectionlabel)

base = base:done return baseend

return p