Skip to content

Commit 6a56ae4

Browse files
authored
Fix: Remove trimming of matched content in Executor.js (Acode-Foundation#1798)
The output should not be trimmed. Using trim() breaks streamed output (line-by-line) because it removes leading spaces. This results in invalid output for many use cases, such as diffs and git status symbol.
1 parent 019c73c commit 6a56ae4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plugins/terminal/www/Executor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Executor {
4747
const match = message.match(/^([^:]+):(.*)$/);
4848
if (match) {
4949
const prefix = match[1]; // e.g. "stdout"
50-
const content = match[2].trim(); // output
50+
const content = match[2]; // output
5151
onData(prefix, content);
5252
} else {
5353
onData("unknown", message);
@@ -198,4 +198,4 @@ class Executor {
198198
const executorInstance = new Executor();
199199
executorInstance.BackgroundExecutor = new Executor(true);
200200

201-
module.exports = executorInstance;
201+
module.exports = executorInstance;

0 commit comments

Comments
 (0)