File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -417,7 +417,7 @@ impl<'a> Context<'a> {
417
417
418
418
let mut js = if self . config . no_modules {
419
419
format ! (
420
- "
420
+ "\
421
421
(function() {{
422
422
var wasm;
423
423
const __exports = {{}};
@@ -438,8 +438,7 @@ impl<'a> Context<'a> {
438
438
}});
439
439
}};
440
440
self.{global_name} = Object.assign(init, __exports);
441
- }})();
442
- " ,
441
+ }})();" ,
443
442
globals = self . globals,
444
443
module = module_name,
445
444
global_name = self . config. no_modules_global
Original file line number Diff line number Diff line change @@ -388,10 +388,12 @@ fn reset_indentation(s: &str) -> String {
388
388
indent = indent. saturating_sub ( 1 ) ;
389
389
}
390
390
let extra = if line. starts_with ( ':' ) || line. starts_with ( '?' ) { 1 } else { 0 } ;
391
- for _ in 0 ..indent + extra {
392
- dst. push_str ( " " ) ;
391
+ if !line. is_empty ( ) {
392
+ for _ in 0 ..indent + extra {
393
+ dst. push_str ( " " ) ;
394
+ }
395
+ dst. push_str ( line) ;
393
396
}
394
- dst. push_str ( line) ;
395
397
dst. push_str ( "\n " ) ;
396
398
if line. ends_with ( '{' ) {
397
399
indent += 1 ;
You can’t perform that action at this time.
0 commit comments