Skip to content

Reset all attributes after colorization #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dahbug.php
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ static protected function _colorize($string, $color = null)
return $string;
}

$string = "\033[{$colorNumber}m" . $string . "\033[39m";
$string = "\033[{$colorNumber}m" . $string . "\033[0m";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pointing this out.
The problem with this is that background color will also be reset. I've changed the escape code to "\033[39;0m" which will reset bold state aswell. Let me know if this does the trick.


return $string;
}
Expand Down