localp={}functionp.getSectionsFromWikitext(wikitext,sectionLevel)if(wikitext==nil)thenreturn{}end-- Next split by section levelslocalsectionDefinitionRegex=''if(sectionLevel==nil)thensectionDefinitionRegex='=+'elsesectionDefinitionRegex=mw.ustring.rep('=',sectionLevel)endlocalsectionRegex='\n[ ]-'..sectionDefinitionRegex..'[^=]+'..sectionDefinitionRegex..'[ ]-\n'localsections=mw.text.split(wikitext,sectionRegex)returnsectionRegexendfunctionp.getSectionsFromTitle(title,sectionLevel)localtitleObject=mw.title.new(title)localpageWikitext=titleObject:getContent()returnp.getSectionsFromWikitext(wikitext,sectionLevel)endfunctionp.getPrinciples(title)localsections=p.getSectionsFromTitle(title,2)endreturnp