mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2025-01-04 10:24:27 +03:00
Remove leading and trailing blanks from the --no-modules output
The output using modules already uses string formatting that carefully avoids emitting leading and trailing blanks; adjust the --no-modules output to match.
This commit is contained in:
parent
05a0a5c6a1
commit
1c52fb1b2f
@ -417,7 +417,7 @@ impl<'a> Context<'a> {
|
|||||||
|
|
||||||
let mut js = if self.config.no_modules {
|
let mut js = if self.config.no_modules {
|
||||||
format!(
|
format!(
|
||||||
"
|
"\
|
||||||
(function() {{
|
(function() {{
|
||||||
var wasm;
|
var wasm;
|
||||||
const __exports = {{}};
|
const __exports = {{}};
|
||||||
@ -438,8 +438,7 @@ impl<'a> Context<'a> {
|
|||||||
}});
|
}});
|
||||||
}};
|
}};
|
||||||
self.{global_name} = Object.assign(init, __exports);
|
self.{global_name} = Object.assign(init, __exports);
|
||||||
}})();
|
}})();",
|
||||||
",
|
|
||||||
globals = self.globals,
|
globals = self.globals,
|
||||||
module = module_name,
|
module = module_name,
|
||||||
global_name = self.config.no_modules_global
|
global_name = self.config.no_modules_global
|
||||||
|
Loading…
Reference in New Issue
Block a user