Edit report at https://pear.php.net/bugs/bug.php?id=19626&edit=1
ID: 19626
Updated by: [email protected]
Reported By: [email protected]
Summary: Going from Light to Dark color does not work
-Status: Open
+Status: Closed
Type: Bug
Package: Console_Color2
Operating System: Agnostic
Package Version: 0.1.1
PHP Version: 5.3.3
-Assigned To:
+Assigned To: doconnor
Roadmap Versions:
New Comment:
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: doconnor
This bug has been fixed in SVN.
If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should
be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
Previous Comments:
------------------------------------------------------------------------
[2012-09-29 21:09:54] jnovack
Description:
------------
Printing the same color as a Light and then switching to it's Dark
color requires a %n (or other color shift) before the Dark color
shows correctly.
A patch has been submitted to GitHub.
https://github.com/pear/Console_Color2/pull/4
Test script:
---------------
<?php
require 'Console/Color2.php';
$c = new Console_Color2();
print $c->convert("%r[%R1%r/%R100%r]%n\n");
?>
Expected result:
----------------
I expect to see:
red[RED1red/RED100red]
The brackets and slash are dark red, and the numbers are light
red.
Actual result:
--------------
I see:
red[RED1/100]
The first bracket is dark red, the rest of the text is light red.
------------------------------------------------------------------------