cvs: pear /Text_Wiki/Text/Wiki/Parse/Mediawiki Emphasis.php
| From: | bertrand Gugger | Date: | Wed, 15 Feb 2006 12:27:41 +0000 |
| Subject: | cvs: pear /Text_Wiki/Text/Wiki/Parse/Mediawiki Emphasis.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-38252@lists.php.net to get a copy of this message | ||
toggg Wed Feb 15 12:27:41 2006 UTC
Modified files:
/pear/Text_Wiki/Text/Wiki/Parse/Mediawiki Emphasis.php
Log:
No more need to fake a Strong parsing rule since Render loads dinamically
http://cvs.php.net/viewcvs.cgi/pear/Text_Wiki/Text/Wiki/Parse/Mediawiki/Emphasis.php?r1=1.3&r2=1.4&diff_format=u
Index: pear/Text_Wiki/Text/Wiki/Parse/Mediawiki/Emphasis.php
diff -u pear/Text_Wiki/Text/Wiki/Parse/Mediawiki/Emphasis.php:1.3
pear/Text_Wiki/Text/Wiki/Parse/Mediawiki/Emphasis.php:1.4
--- pear/Text_Wiki/Text/Wiki/Parse/Mediawiki/Emphasis.php:1.3 Wed Feb 15 06:04:03 2006
+++ pear/Text_Wiki/Text/Wiki/Parse/Mediawiki/Emphasis.php Wed Feb 15 12:27:40 2006
@@ -15,7 +15,7 @@
* @author Paul M. Jones <pmjones@php.net>
* @copyright 2005 bertrand Gugger
* @license http://www.gnu.org/copyleft/lesser.html LGPL
License 2.1
- * @version CVS: $Id: Emphasis.php,v 1.3 2006/02/15 06:04:03 toggg Exp $
+ * @version CVS: $Id: Emphasis.php,v 1.4 2006/02/15 12:27:40 toggg Exp $
* @link http://pear.php.net/package/Text_Wiki
*/
@@ -61,8 +61,6 @@
*/
function process(&$matches)
{
- static $strongDisabled = true;
- $strongNeeded = false;
$embeded = $matches[2];
switch (strlen($matches[1])) {
case 1:
@@ -74,22 +72,14 @@
case 2:
$start = $this->wiki->addToken('Strong', array('type'
=> 'start'));
$end = $this->wiki->addToken('Strong', array('type'
=> 'end'));
- $strongNeeded = true;
break;
case 4:
$start = $this->wiki->addToken($this->rule, array('type' =>
'start'))
. $this->wiki->addToken('Strong', array('type'
=> 'start'));
$end = $this->wiki->addToken('Strong', array('type'
=> 'end'))
. $this->wiki->addToken($this->rule, array('type' =>
'end'));
- $strongNeeded = true;
break;
}
-
- // insert a fake Strong if needed (only for rendering)
- if ($strongDisabled && $strongNeeded) {
- $this->wiki->parseObj['Strong'] = null;
- $strongDisabled = false;
- }
return $start . $embeded . $end;
}
}