cvs: pear /Text_Wiki/Text/Wiki/Parse/Creole Image.php

From: Date: Fri, 28 Sep 2007 22:02:50 +0000
Subject: cvs: pear /Text_Wiki/Text/Wiki/Parse/Creole Image.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-48696@lists.php.net to get a copy of this message
mic Fri Sep 28 22:02:50 2007 UTC Modified files: /pear/Text_Wiki/Text/Wiki/Parse/Creole Image.php Log: Avoid handling images which include other markup http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/Text/Wiki/Parse/Creole/Image.php?r1=1.4&r2=1.5&diff_format=u Index: pear/Text_Wiki/Text/Wiki/Parse/Creole/Image.php diff -u pear/Text_Wiki/Text/Wiki/Parse/Creole/Image.php:1.4 pear/Text_Wiki/Text/Wiki/Parse/Creole/Image.php:1.5 --- pear/Text_Wiki/Text/Wiki/Parse/Creole/Image.php:1.4 Mon Sep 3 21:58:21 2007 +++ pear/Text_Wiki/Text/Wiki/Parse/Creole/Image.php Fri Sep 28 22:02:50 2007 @@ -12,7 +12,7 @@ * * @license LGPL * - * @version $Id: Image.php,v 1.4 2007/09/03 21:58:21 mic Exp $ + * @version $Id: Image.php,v 1.5 2007/09/28 22:02:50 mic Exp $ * */ @@ -21,18 +21,21 @@ /** * - * The regular expression used to parse the source text and find - * matches conforming to this rule. Used by the parse() method. + * Constructor. Overrides the Text_Wiki_Parse constructor so that we + * can set the $regex property dynamically (we need to include the + * Text_Wiki $delim character). * - * @access public - * - * @var string + * @param object &$obj The calling "parent" Text_Wiki object. * - * @see parse() + * @param string $name The token name to use for this rule. * */ - var $regex = '/{{(.*)(\|(.*))?}}/U'; + function Text_Wiki_Parse_Image(&$obj) + { + parent::Text_Wiki_Parse($obj); + $this->regex = '/{{([^' . $this->wiki->delim . ']*)(\|([^' . $this->wiki->delim . ']*))?}}/U'; + } /**

« previous php.pear.cvs (#48696) next »