We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b356fc0 + cf4ab38 commit a7d1d1dCopy full SHA for a7d1d1d
src/lib.rs
@@ -540,6 +540,7 @@ pub fn format_snippet(snippet: &str, config: &Config) -> Option<String> {
540
let input = Input::Text(snippet.into());
541
let mut config = config.clone();
542
config.set().write_mode(config::WriteMode::Plain);
543
+ config.set().hide_parse_errors(true);
544
match format_input(input, &config, Some(&mut out)) {
545
// `format_input()` returns an empty string on parsing error.
546
Ok(..) if out.is_empty() && !snippet.is_empty() => None,
0 commit comments