Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions crates/oxc_diagnostics/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ impl DiagnosticService {
}

if let Some(mut err_str) = self.reporter.render_error(diagnostic) {
// Skip large output and print only once
if err_str.lines().any(|line| line.len() >= 400) {
// Skip large output and print only once.
// Setting to 1200 because graphical output may contain ansi escape codes and other decorations.
if err_str.lines().any(|line| line.len() >= 1200) {
let minified_diagnostic = Error::new(
OxcDiagnostic::warn("File is too long to fit on the screen")
.with_help(format!("{path:?} seems like a minified file")),
Expand Down