local p =
function p.getSectionsFromWikitext(wikitext, sectionLevel) if (wikitext
nil) then sectionDefinitionRegex = '=+' else sectionDefinitionRegex = mw.ustring.rep('=', sectionLevel) end local sectionRegex = '\n[]-' .. sectionDefinitionRegex .. '[^=]+' .. sectionDefinitionRegex .. '[]-\n' local sections = mw.text.split(wikitext, sectionRegex) return sectionRegexend
function p.getSectionsFromTitle(title, sectionLevel) local titleObject = mw.title.new(title) local pageWikitext = titleObject:getContent return p.getSectionsFromWikitext(wikitext, sectionLevel)end
function p.getPrinciples(title) local sections = p.getSectionsFromTitle(title, 2)end
return p