Add more structure to the wasm compare.

This commit is contained in:
Tom Alexander
2023-12-27 10:52:59 -05:00
parent 99376515ef
commit 4bfea41291
2 changed files with 87 additions and 13 deletions

View File

@@ -41,19 +41,19 @@ pub async fn wasm_run_anonymous_compare_with_settings<'g, 's, P: AsRef<str>>(
// We do the diffing after printing out both parsed forms in case the diffing panics
let diff_result = wasm_compare_document(&parsed_sexp, &wasm_parsed)?;
// if !silent {
// diff_result.print(org_contents)?;
// }
if !silent {
diff_result.print(org_contents)?;
}
// if diff_result.is_bad() {
// return Ok(false);
// } else if !silent {
// println!(
// "{color}Entire document passes.{reset}",
// color = DiffResult::foreground_color(0, 255, 0),
// reset = DiffResult::reset_color(),
// );
// }
if diff_result.is_bad() {
return Ok(false);
} else if !silent {
// println!(
// "{color}Entire document passes.{reset}",
// color = WasmDiffResult::foreground_color(0, 255, 0),
// reset = WasmDiffResult::reset_color(),
// );
}
Ok(true)
}