Fix the color wrap function#186
Fix the color wrap function#186martynsmith merged 1 commit intomartynsmith:masterfrom cattode:wrap-patch
Conversation
|
Welcome to GitHub, @cattode! For further reference, please also state what was done to "fix" the issue in your summary and it doesn't hurt to go in depth a little more. For example, in this case one might say the following:
A statement like this not only states the issue clearly, it also states the intended result of the solution. This way even if this commit isn't pulled, the repository owner will still be notified of the issue and made aware of a potential solution (especially for more complex issues). |
|
Yeah sorry, you're right, I don't use github often so I'm not very used to making pull requests yet. I've edited my message according to your recommendations! |
|
Yeah, it boggles how the original version even got there, this definitely looks like a step forward, thanks :-) |
Fix the color wrap function
The wrap color function isn't working properly, allowing invalid color names for color and not taking reset_color into account.
This commit forces input validation against the list of color codes: if
coloris an invalid color entry, the function returns only the unmodified text; ifreset_coloris invalid, it is set to 'reset'.