zkat / miette

Fancy extension for std::error::Error with pretty, detailed diagnostic printing.
https://docs.rs/miette
Apache License 2.0
2.03k stars 116 forks source link

feat(fancy): Add option to change the link display texts #335

Closed calavera closed 9 months ago

calavera commented 9 months ago

This option allows to globally change the default (link) display text with any other text provider by users.

I investigated if it was possible to change the display text per error, but I was not sold of any option I tried. I think this is a pretty simple addition that can help people like me that just want to change this text for all the errors.

Fixes #331

calavera commented 9 months ago

The two failing tests also fail in main. I don't know what they're about.

 failures:
    non_adjacent_highlight
    triple_adjacent_highlight
zkat commented 9 months ago

They're minor issues--miette is outputting whitespace before the newline but autoformatting editors (like mine) remove trailing whitespace, so the strings end up not exactly matching. There's no actual problem. Merged :)