5 * Parses for implied line breaks indicated by newlines.
11 * @author Paul M. Jones <pmjones@php.net>
15 * @version $Id: Newline.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
21 * Parses for implied line breaks indicated by newlines.
23 * This class implements a Text_Wiki_Parse to mark implied line breaks in the
24 * source text, usually a single carriage return in the middle of a paragraph
25 * or block-quoted text.
31 * @author Paul M. Jones <pmjones@php.net>
35 class Text_Wiki_Parse_Newline
extends Text_Wiki_Parse
{
40 * The regular expression used to parse the source text and find
41 * matches conforming to this rule. Used by the parse() method.
51 var $regex = '/([^\n])\n([^\n])/m';
56 * Generates a replacement token for the matched text.
60 * @param array &$matches The array of matches from parse().
62 * @return string A delimited token to be used as a placeholder in
67 function process(&$matches)
70 $this->wiki
->addToken($this->rule
) .