cvs: pear /Text_Wiki/Text/Wiki Creole.php
| From: | Michele Tomaiuolo | Date: | Tue, 24 Oct 2006 07:41:19 +0000 |
| Subject: | cvs: pear /Text_Wiki/Text/Wiki Creole.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-42780@lists.php.net to get a copy of this message | ||
mic Tue Oct 24 07:41:19 2006 UTC
Modified files:
/pear/Text_Wiki/Text/Wiki Creole.php
Log:
check-inner-tags counts open/end tags
http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/Text/Wiki/Creole.php?r1=1.1&r2=1.2&diff_format=u
Index: pear/Text_Wiki/Text/Wiki/Creole.php
diff -u pear/Text_Wiki/Text/Wiki/Creole.php:1.1 pear/Text_Wiki/Text/Wiki/Creole.php:1.2
--- pear/Text_Wiki/Text/Wiki/Creole.php:1.1 Mon Oct 23 13:11:27 2006
+++ pear/Text_Wiki/Text/Wiki/Creole.php Tue Oct 24 07:41:19 2006
@@ -17,7 +17,7 @@
*
* @link http://pear.php.net/package/Text_Wiki
*
- * @version CVS: $Id: Creole.php,v 1.1 2006/10/23 13:11:27 mic Exp $
+ * @version CVS: $Id: Creole.php,v 1.2 2006/10/24 07:41:19 mic Exp $
*
*/
@@ -92,14 +92,14 @@
$rule = strtolower($this->tokens[$t][0]);
$type = $this->tokens[$t][1]['type'];
- if ($type == 'end' && ! $started[$rule]) {
- return false;
- }
- else if ($type == 'start') {
- $started[$rule] = true;
+ if ($type == 'start') {
+ $started[$rule] += 1;
}
else if ($type == 'end') {
- unset($started[$rule]);
+ if (! $started[$rule]) return false;
+
+ $started[$rule] -= 1;
+ if (! $started[$rule]) unset($started[$rule]);
}
}
return ! (count($started) > 0);