Text_Wiki
[ class tree: Text_Wiki ] [ index: Text_Wiki ] [ all elements ]

Source for file Newline.php

Documentation is available at Newline.php

  1. <?php
  2.  
  3. /**
  4.  *
  5.  * Parses for implied line breaks indicated by newlines.
  6.  * Newlines are not considered if followed by another newline
  7.  * or by one of these chars: * | - # = {
  8.  *
  9.  * @category Text
  10.  *
  11.  * @package Text_Wiki
  12.  *
  13.  * @author Michele Tomaiuolo <tomamic@yahoo.it>
  14.  *
  15.  * @license LGPL
  16.  *
  17.  * @version $Id: Newline.php,v 1.2 2007/02/01 09:33:00 mic Exp $
  18.  *
  19.  */
  20.  
  21. class Text_Wiki_Parse_Newline extends Text_Wiki_Parse {
  22.  
  23.  
  24.     /**
  25.      *
  26.      * The regular expression used to parse the source text and find
  27.      * matches conforming to this rule.  Used by the parse() method.
  28.      *
  29.      * @access public
  30.      *
  31.      * @var string 
  32.      *
  33.      * @see parse()
  34.      *
  35.      */
  36.  
  37.     var $regex = '/(?<!\n)\n(?!\n)/m';
  38.  
  39.  
  40.     /**
  41.      *
  42.      * Generates a replacement token for the matched text.
  43.      *
  44.      * @access public
  45.      *
  46.      * @param array &$matches The array of matches from parse().
  47.      *
  48.      * @return string A delimited token to be used as a placeholder in
  49.      *  the source text.
  50.      *
  51.      */
  52.  
  53.     function process(&$matches)
  54.     {
  55.         return ' '// $this->wiki->addToken($this->rule);
  56.     }
  57. }
  58.  
  59. ?>

Documentation generated on Mon, 11 Mar 2019 14:55:48 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.