includes/wikiengine/parse_mediawiki.php
changeset 1031 8a4b75e73137
parent 1027 98c052fc3337
child 1044 ad6a22377507
equal deleted inserted replaced
1030:23959360dcfd 1031:8a4b75e73137
    57     return array();
    57     return array();
    58   }
    58   }
    59   
    59   
    60   public function heading(&$text)
    60   public function heading(&$text)
    61   {
    61   {
    62     if ( !preg_match_all('/^(={1,6}) *(.+?) *\\1$/m', $text, $results) )
    62     if ( !preg_match_all('/^(={1,6}) *(.+?) *\\1 *$/m', $text, $results) )
    63       return array();
    63       return array();
    64     
    64     
    65     $headings = array();
    65     $headings = array();
    66     foreach ( $results[0] as $i => $match )
    66     foreach ( $results[0] as $i => $match )
    67     {
    67     {