On 2/28/07, Andrew Dunbar hippytrail@gmail.com wrote:
Actually both headings and blocks (the parts of sections between the headings) are also regexed in a couple of places in Parser.php/formatHeadings
I'm not sure if it should be centralized into a function.
Why not supersede getSection and replaceSection with getSections and replaceSections functions that return/accept arrays of section number => array(section title, section level, section text) or something (could just be section number => text-including-section title/level/text)? That's more flexible, and in many cases it will be a good deal faster as well (if you want to deal with multiple sections on the page).