Bug: Link field with ANSI characters inside `GraphicalTheme::none/unicode_nocolor` using the `GraphicalReportHandler`
I'm currently making snapshot tests with non-ansi theme:
miette::GraphicalReportHandler::new_themed(miette::GraphicalTheme::unicode_nocolor())
but it produces ansi characters for the links:
]8;;https://eslint.org/docs/rules/no-cond-assign\(link)]8;;\
It seems like the characters are hard code here: https://github.com/zkat/miette/blob/714334098a92c77fb6b962e627defab7e16b540d/src/handlers/graphical.rs#L167-L172
Expected Outcome
I'm expecting GraphicalTheme::unicode_nocolor() and GraphicalTheme::none() to produce no ansi characters for the link field inside the GraphicalReportHandler
These aren't part of the theme because they're actually determined by the link style. You can disable them by setting .with_links(false) in your GraphicalReportHandler.
It seems .with_links(false) sets LinkStyle::Text, then it got omitted here and the link stopped showing up 😂 :
https://github.com/zkat/miette/blob/714334098a92c77fb6b962e627defab7e16b540d/src/handlers/graphical.rs#L160
should this be self.links != LinkStyle::None?
Why self.links != LinkStyle::None? That would make the link spit out the ANSI characters even when the user requests that the link only be rendered as plain text.