Add `rm_whitespace` option
This commit is contained in:
parent
9c4b6352d5
commit
61ff466976
|
@ -45,7 +45,7 @@ impl Compiler {
|
||||||
});
|
});
|
||||||
|
|
||||||
let resolver = Resolver::new().include_handler(include_handler);
|
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 compile_file = |input: &Path, output: &Path| -> Result<(), Error> {
|
||||||
let mut tsource = self.translate_file_contents(input)?;
|
let mut tsource = self.translate_file_contents(input)?;
|
||||||
|
|
|
@ -115,7 +115,7 @@ impl VisitMut for OptmizerImpl {
|
||||||
buffer.push_str(line.trim_start());
|
buffer.push_str(line.trim_start());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
i.mac.tokens = quote! { sfrt::render_text!(_ctx, #buffer); };
|
i.mac.tokens = quote! { _ctx, #buffer };
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue