From 70e84f9a019008a38ed22416f1fc399d32f50db4 Mon Sep 17 00:00:00 2001 From: Christopher Durham Date: Fri, 18 Mar 2022 18:30:00 -0500 Subject: [PATCH] fix(handler): Apply MietteHandlerOpts::graphical_theme (#138) Fixes: https://github.com/zkat/miette/issues/134 --- src/handler.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/handler.rs b/src/handler.rs index 9ed1bd3..ada2f3e 100644 --- a/src/handler.rs +++ b/src/handler.rs @@ -167,10 +167,11 @@ impl MietteHandlerOpts { } else { ThemeStyles::none() }; + let theme = self.theme.unwrap_or(GraphicalTheme { characters, styles }); let mut handler = GraphicalReportHandler::new() .with_width(width) .with_links(linkify) - .with_theme(GraphicalTheme { characters, styles }); + .with_theme(theme); if let Some(footer) = self.footer { handler = handler.with_footer(footer); }