diff --git a/lang/src/fs.rs b/lang/src/fs.rs index 83300030..6a628f74 100644 --- a/lang/src/fs.rs +++ b/lang/src/fs.rs @@ -74,7 +74,7 @@ pub fn run_compiler(root_file: &str, options: Options, out: &mut Vec) -> std fn format_ast(ast: parser::Ast) -> std::io::Result<()> { let mut output = String::new(); write!(output, "{ast}").unwrap(); - if ast.file.deref() != output.as_str() { + if ast.file.deref().trim() != output.as_str().trim() { std::fs::write(&*ast.path, output)?; } Ok(())