includes/wikiengine/Parse/Mediawiki/Paragraph.php
changeset 32 4d87aad3c4c0
parent 1 fe660c52c48f
equal deleted inserted replaced
31:dc8741857bde 32:4d87aad3c4c0
    54             'heading',
    54             'heading',
    55             'horiz',
    55             'horiz',
    56             'deflist',
    56             'deflist',
    57             'table',
    57             'table',
    58             'list',
    58             'list',
    59             'toc'
    59             'toc',
       
    60             'pre'
    60         )
    61         )
    61     );
    62     );
    62     
    63     
    63     
    64     
    64     /**
    65     /**
   140             );
   141             );
   141             
   142             
   142             return $start . trim($matches[0]) . $end;
   143             return $start . trim($matches[0]) . $end;
   143         }
   144         }
   144     }
   145     }
       
   146     
       
   147     /**
       
   148     *
       
   149     * Abstrct method to parse source text for matches.
       
   150     *
       
   151     * Applies the rule's regular expression to the source text, passes
       
   152     * every match to the process() method, and replaces the matched text
       
   153     * with the results of the processing.
       
   154     *
       
   155     * @access public
       
   156     *
       
   157     * @see Text_Wiki_Parse::process()
       
   158     *
       
   159     */
       
   160 
       
   161     function parse()
       
   162     {
       
   163         $source =& $this->wiki->source;
       
   164         $source = wikiformat_process_block($source);
       
   165         
       
   166         $source = preg_replace('/<litewiki>(.*?)<\/litewiki>([\s]+?|$)/is', '<litewiki>\\1\\2</litewiki>', $source);
       
   167         
       
   168         // die('<pre>' . htmlspecialchars($source) . '</pre>');
       
   169         
       
   170         $this->wiki->source = preg_replace_callback(
       
   171             $this->regex,
       
   172             array(&$this, 'process'),
       
   173             $this->wiki->source
       
   174         );
       
   175         
       
   176         $source = preg_replace('/<litewiki>(.*?)<\/litewiki>/is', '\\1', $source);
       
   177     }
   145 }
   178 }
   146 ?>
   179 ?>