cvs: pear /Text_Wiki/Text/Wiki/Parse/Mediawiki Table.php

From: Date: Mon, 15 Aug 2005 19:52:46 +0000
Subject: cvs: pear /Text_Wiki/Text/Wiki/Parse/Mediawiki Table.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-33993@lists.php.net to get a copy of this message
toggg Mon Aug 15 15:52:46 2005 EDT Modified files: /pear/Text_Wiki/Text/Wiki/Parse/Mediawiki Table.php Log: Colspan and rowspan also recognized without quotes http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Parse/Mediawiki/Table.php?r1=1.5&r2=1.6&ty=u Index: pear/Text_Wiki/Text/Wiki/Parse/Mediawiki/Table.php diff -u pear/Text_Wiki/Text/Wiki/Parse/Mediawiki/Table.php:1.5 pear/Text_Wiki/Text/Wiki/Parse/Mediawiki/Table.php:1.6 --- pear/Text_Wiki/Text/Wiki/Parse/Mediawiki/Table.php:1.5 Mon Aug 15 14:34:53 2005 +++ pear/Text_Wiki/Text/Wiki/Parse/Mediawiki/Table.php Mon Aug 15 15:52:41 2005 @@ -15,7 +15,7 @@ * @author Bertrand Gugger <bertrand@toggg.com> * @copyright 2005 bertrand Gugger * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Table.php,v 1.5 2005/08/15 18:34:53 toggg Exp $ + * @version CVS: $Id: Table.php,v 1.6 2005/08/15 19:52:41 toggg Exp $ * @link http://pear.php.net/package/Text_Wiki */ @@ -266,11 +266,11 @@ 'order' => $order ); if ($format = trim($matches[2])) { - if (preg_match('#(.*)colspan=("|\')?(\d+)\2(.*)#i', $format, $pieces)) { + if (preg_match('#(.*)colspan=("|\')?(\d+)(?(2)\2)(.*)#i', $format, $pieces)) { $param['span'] = (int)$pieces[3]; $format = $pieces[1] . $pieces[4]; } - if (preg_match('#(.*)rowspan=("|\')?(\d+)\2(.*)#i', $format, $pieces)) { + if (preg_match('#(.*)rowspan=("|\')?(\d+)(?(2)\2)(.*)#i', $format, $pieces)) { $this->_spanCells[$this->_level][$order] = $param['rowspan'] = (int)$pieces[3]; $format = $pieces[1] . $pieces[4];

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