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

Coloring errors #41

Closed
Razican opened this Issue Sep 29, 2016 · 8 comments

Comments

Projects
None yet
4 participants
@Razican
Member

Razican commented Sep 29, 2016

We currently have some coloring errors in the console, this should be fixed for the next version (or hopefully, if it's really easy to fix, for 0.1.0.

An example:
screenshot

@pocket7878

This comment has been minimized.

Contributor

pocket7878 commented Oct 13, 2016

Is there any minimum example to reproduce this error?

@Br1oP

This comment has been minimized.

Member

Br1oP commented Oct 13, 2016

Hello, @pocket7878. I just made a simple example to reproduce the error. This is the code:

extern crate colored;

use colored::*;

fn main() {
    let world = "world".bold();
    let hello_world = format!("Hello, {}!", world);
    println!("{}", hello_world);
    let hello_world = format!("Hello, {}!lalalala", world).red();
    println!("{}", hello_world);
}

These are the results:

error

As you see, when you mix bold + colour, the colouring is not working correctly. It should colour the whole sentence but it stops at the exclamation mark.

@Razican

This comment has been minimized.

Member

Razican commented Oct 13, 2016

I reported the issue in upstream.

It might be solved using termion (tutorial), since it seems an upstream issue. If not, we might need to modify our printing system, maybe creating our own printing library.

@mackwic

This comment has been minimized.

mackwic commented Oct 14, 2016

Thanks for the bug report. Please update to colored 1.3.1 which fixes the problem as the tests, and the example show (you can run cargo run --example=nested_colors to see @Br1oP's example passing).

If you have any issue or suggestion to make colored better, don't hesitate to submit an issue. Have a great day

Ref PR: mackwic/colored#12

@Br1oP

This comment has been minimized.

Member

Br1oP commented Oct 14, 2016

Cool, it works great now!

I'm closing this issue, thx.

@Br1oP Br1oP closed this Oct 14, 2016

nasa42 added a commit to cmr/this-week-in-rust that referenced this issue Oct 17, 2016

@Razican

This comment has been minimized.

Member

Razican commented Nov 9, 2016

This has been reopened in upstream, seems that we still have the problem: colored/#11

@Razican Razican reopened this Nov 9, 2016

@Razican Razican modified the milestones: SUPER 0.3.0, SUPER 0.2.0 Nov 9, 2016

@Razican Razican added novemb.rs and removed novemb.rs labels Nov 17, 2016

@mackwic

This comment has been minimized.

mackwic commented Nov 25, 2016

Again, thank you for the bug report. It should be ok, now 👍

@mackwic

This comment has been minimized.

mackwic commented Nov 26, 2016

(please update to 1.3.2 by the way)

Razican added a commit that referenced this issue Nov 27, 2016

@Razican Razican closed this Nov 27, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment