Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
248 jpm 1
<?php
2
// $Id: Break.php,v 1.1 2005-01-20 19:43:20 jpm Exp $
3
 
4
 
5
/**
6
*
7
* This class implements a Text_Wiki_Parse to mark forced line breaks in the
8
* source text.
9
*
10
* @author Paul M. Jones <pmjones@ciaweb.net>
11
*
12
* @package Text_Wiki
13
*
14
*/
15
 
16
class Text_Wiki_Parse_Break extends Text_Wiki_Parse {
17
 
18
 
19
    /**
20
    *
21
    * The regular expression used to parse the source text and find
22
    * matches conforming to this rule.  Used by the parse() method.
23
    *
24
    * @access public
25
    *
26
    * @var string
27
    *
28
    * @see parse()
29
    *
30
    */
31
 
32
    var $regex = '/ _\n/';
33
 
34
 
35
    /**
36
    *
37
    * Generates a replacement token for the matched text.
38
    *
39
    * @access public
40
    *
41
    * @param array &$matches The array of matches from parse().
42
    *
43
    * @return string A delimited token to be used as a placeholder in
44
    * the source text.
45
    *
46
    */
47
 
48
    function process(&$matches)
49
    {
50
        return $this->wiki->addToken($this->rule);
51
    }
52
}
53
 
54
?>