pub fn render(
diagnostics: &[Diagnostic],
filename: &str,
source: &str,
) -> StringExpand description
Render a slice of diagnostics to a string using ariadne for source context.
filename and source must correspond to the file referenced by the
diagnostics’ spans. This function is intentionally decoupled from
bock-source types so that bock-errors stays dependency-free.
Color is decided automatically via color_enabled_for_diagnostics:
ANSI escapes are emitted only when stderr is an interactive terminal and
NO_COLOR is unset. Use render_with_color to force the decision.