Last modified: 2014-02-12 23:54:04 UTC
The regex used to detect section headings in MobileFormatter.php does not work in the event that section headings span multiple lines in the source, which breaks making the sections toggleable. Here's the currently existing regex: <code> protected function headingTransform( $s ) { wfProfileIn( __METHOD__ ); $callback = "headingTransformCallback{$this->format}"; // Closures are a PHP 5.3 feature. // MediaWiki currently requires PHP 5.2.3 or higher. // So, using old style for now. $s = preg_replace_callback( '/<h2(.*)<span class="mw-headline" [^>]*>(.+)<\/span>\w*<\/h2>/', array( $this, $callback ), $s ); </code> This pattern will not work in the event of something like: <code> <h2> <span class="mw-headline" id="Sighting">Sighting</span> </h2> </code> We need a less rigid way of detecting section headers.
Resolved in https://gerrit.wikimedia.org/r/#change,6007
Actually resolved in https://gerrit.wikimedia.org/r/#change,6039,patchset=1