Home » Text » Text_Highlighter » Bug #4607
The span class="hl-brackets" shall not include the spaces before
Details
| Request #4607 | The span class="hl-brackets" shall not include the spaces before |
|---|---|
| Submitted | 2005-06-16 14:51 UTC |
| From | priplatv at netscape dot net |
| Status | Closed |
| Package | Text_Highlighter |
| PHP Version | 5.0.3 |
| OS | Win XP but irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2005-06-16 14:51 UTC] priplatv at netscape dot net
Description:
------------
Text_Highlighter version 0.6.5
With list numbering on and tabsize set, the span class="hl-brackets" includes the spaces (from the tabs) before the bracket, which does not nicely display in case the class set the background-color.
Reproduce code:
---------------
$src = <<< EOT
\t<p>Two paragraphs </p><p>correctly nested</p>
\t<p>Paragraph with correctly <em>emphasized</em> overlapping</p>
EOT;
echo $hl -> highlight($src);
Expected result:
----------------
<ol class="hl-main">
<li>
<span class="hl-brackets"><</span>
<span class="hl-reserved">p</span>
<span class="hl-brackets">></span>
...
<span class="hl-brackets">></span>
</li>
<li>
<span class="hl-brackets"><</span>
<span class="hl-reserved">p</span>
<span class="hl-brackets">></span>
...
<span class="hl-brackets">></span>
</li>
</ol>
Actual result:
--------------
<ol class="hl-main">
<li> </span>
<span class="hl-brackets"><</span>
<span class="hl-reserved">p</span>
<span class="hl-brackets">></span>
...
<span class="hl-brackets">></span>
</li>
<li>
<span class="hl-brackets"> <</span>
<span class="hl-reserved">p</span>
<span class="hl-brackets">></span>
...
<span class="hl-brackets">></span>
</li>
</ol>