Skip to content

Commit f23d84c

Browse files
author
David Haeffner
committed
Fixed indentation of new window handling when outputted in a method added from the run command
1 parent b66651b commit f23d84c

File tree

1 file changed

+11
-1
lines changed
  • packages/code-export-utils/src

1 file changed

+11
-1
lines changed

packages/code-export-utils/src/emit.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,17 @@ async function emitCommands(commands, emitter) {
8080
const _commands = commands.map(command => {
8181
return emitter.emit(command)
8282
})
83-
const result = await Promise.all(_commands)
83+
const emittedCommands = await Promise.all(_commands)
84+
let result = []
85+
emittedCommands.forEach(entry => {
86+
if (typeof entry === 'string' && entry.includes('\n')) {
87+
entry.split('\n').forEach(subEntry => {
88+
result.push(subEntry)
89+
})
90+
} else {
91+
result.push(entry)
92+
}
93+
})
8494
return result
8595
}
8696

0 commit comments

Comments
 (0)