hamstar/Wikimate — Issue #9: section splitting code fails on Wikipedia articles
Author: Chillibear
Created: 2011-11-12 10:19:08+00:00
State: open

in Wikimate.php, line 394 you have a regexp to break the wiki page content down into sections by looking for the headings. As it stands with Wikipedia this code doesn't appear to work as expected because of some of the extensions Wikipedia has installed (references in particular). It picks up the '=' signs in those, things like: src=somthing. A a very quick hacky work around I've been using is:

preg_match_all('/((\r|\n)={1,5}.*={1,5}(\r|\n))/', $this->text, $m );

instead of

preg_match_all('@(={1,5}.*)@', $this->text, $m );

but I dare say with a bit of proper thought a better regexp could be created.