Bug #54364 [Opn->Bgs]: Tidy doesn't merge-spans regardless of setting
Edit report at http://bugs.php.net/bug.php?id=54364&edit=1
ID: 54364
Updated by: dtajchreber@php.net
Reported by: mcamden at rubicon dot com
Summary: Tidy doesn't merge-spans regardless of setting
-Status: Open
+Status: Bogus
Type: Bug
Package: Tidy
Operating System: Windows 7
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
$config = array('clean' => true, ...);
Previous Comments:
------------------------------------------------------------------------
[2011-03-23 23:56:24] mcamden at rubicon dot com
I'm not sure if this is related, but the same is true for merge-divs.
Script:
$html =
'<p><div><div><div>a</div></div></div></p>';
$config = array('merge-spans' => TRUE);
$tidy = tidy_parse_string($html, $config, 'UTF8');
$tidy->cleanRepair();
echo $tidy;
Result:
<p><div><div><div>a</div></div></div></p>
------------------------------------------------------------------------
[2011-03-23 23:47:43] mcamden at rubicon dot com
Description:
------------
Tidy does not merge spans regardless of the configuration. According to
the tidy
website the merge-spans configuration option is defaulted to 'auto'. PHP
reflects
this setting with the number 2. However leaving it defaulted to 'auto'
or setting
to TRUE does not merge spans.
Test script:
---------------
$html =
'<p><span><span><span>a</span></span></span></p>';
$config = array('merge-spans' => TRUE);
$tidy = tidy_parse_string($html, $config, 'UTF8');
$tidy->cleanRepair();
echo $tidy;
Expected result:
----------------
<p><span>a</span></p>
Actual result:
--------------
<p><span><span><span>a</span></span></span></p>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54364&edit=1
Thread (4 messages)