errors: use -Z terminal-width in JSON emitter

This commit makes the JSON emitter use `-Z terminal-width` in the
"rendered" field of the JSON output.

Signed-off-by: David Wood <david@davidtw.co>
This commit is contained in:
David Wood
2020-06-26 13:18:16 +01:00
parent 14e65d5e95
commit 3678e5c97e
7 changed files with 96 additions and 7 deletions

View File

@@ -191,8 +191,15 @@ pub fn new_handler(
Lrc::new(source_map::SourceMap::new(source_map::FilePathMapping::empty()))
});
Box::new(
JsonEmitter::stderr(None, source_map, pretty, json_rendered, false)
.ui_testing(debugging_opts.ui_testing),
JsonEmitter::stderr(
None,
source_map,
pretty,
json_rendered,
debugging_opts.terminal_width,
false,
)
.ui_testing(debugging_opts.ui_testing),
)
}
};