Add `rm_whitespace` option

This commit is contained in:
Kogia-sima 2020-06-07 07:19:09 +09:00
parent 9c4b6352d5
commit 61ff466976
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ impl Compiler {
});
let resolver = Resolver::new().include_handler(include_handler);
let optimizer = Optimizer::new();
let optimizer = Optimizer::new().rm_whitespace(self.config.rm_whitespace);
let compile_file = |input: &Path, output: &Path| -> Result<(), Error> {
let mut tsource = self.translate_file_contents(input)?;

View File

@ -115,7 +115,7 @@ impl VisitMut for OptmizerImpl {
buffer.push_str(line.trim_start());
}
}
i.mac.tokens = quote! { sfrt::render_text!(_ctx, #buffer); };
i.mac.tokens = quote! { _ctx, #buffer };
return;
}
}