PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Text » Text_Highlighter » Bug #6398

CSS highlighter behaves strangely

Details

Submitted2006-01-03 00:09 UTC
Fromsimp at php dot net
Assignedblindman
StatusClosed
PackageText_Highlighter
PHP Version5.0.5
OSirrelevant
Roadmaps(Not assigned)

Comments

[2006-01-03 00:09 UTC] simp at php dot net

Description:
------------
Entering some code into the html renderer of the text highlighter creates weird highlighting. In the example, especially the font-family attributes are highlighted wrong.

Test script:
---------------
body {
background-image: url(../bg.gif);
font-family: Arial,Helfetica,sans-serif;
font-size: 9pt;
color: #000000;
font-weight: normal;
line-height: 12pt;
}

Expected result:
----------------
</span><span class="hl-css-reserved">font-family:</span><span class="hl-css-code"><span class="hl-css-string"> Arial,Helfetica,</span>sans-serif</span><span class="hl-css-reserved"></span><span class="hl-css-code">;

Actual result:
--------------
</span><span class="hl-css-reserved">font-family:</span><span class="hl-css-code"> Arial,Helfetica,</span><span class="hl-css-string">sans-serif</span><span class="hl-css-reserved"></span><span class="hl-css-code">;

[2006-02-01 06:42 UTC] blindman at php dot net

Thank you for taking the time to write to us, but this is not
a bug.

Standard font families (serif, sans-serif, monospace etc.) are CSS keywords and were chosen to be highlighted with different style