We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Config::default().with_color(false)
Despite setting this to false, the colors are shown when added to labels:
pub fn build_report( named: String, err: &ErrorParser, ) -> Report<(String, Range<usize>)> { let mut colors = ColorGenerator::new(); // Generate some colours for each of our elements let primary = colors.next(); // let secondary = colors.next(); let code = err.error_code(); let config = Config::default().with_color(false); let diagnostic = Report::build(ReportKind::Error, named.clone(), 0) .with_code(code as usize) .with_config(config); match err { ErrorParser::ScalarParse { span, kind, msg } => diagnostic .with_message(msg) .with_label( Label::new((named, span.range())) .with_message(msg) .with_color(primary), <-- THIS CAUSE IT TO SHOW COLORS ) .with_note(format!("Parsing value of type: {kind:?}")) .finish(), _ => { todo!() } } }
The text was updated successfully, but these errors were encountered:
Filter label color if config.with_color(false) (#61)
740fac5
Fixes #54
with_message
Successfully merging a pull request may close this issue.
Despite setting this to false, the colors are shown when added to labels:
The text was updated successfully, but these errors were encountered: