diff --git a/assets/components/LogEventSource.spec.js b/assets/components/LogEventSource.spec.js
index b0f4f2b9..9e089cc6 100644
--- a/assets/components/LogEventSource.spec.js
+++ b/assets/components/LogEventSource.spec.js
@@ -81,7 +81,7 @@ describe("", () => {
expect(messageWithoutKey).toMatchInlineSnapshot(`
Object {
"date": 2019-06-12T10:55:42.459Z,
- "message": "\\"This is a message.\\"",
+ "message": " \\"This is a message.\\"",
}
`);
});
@@ -98,7 +98,7 @@ describe("", () => {
expect(messageWithoutKey).toMatchInlineSnapshot(`
Object {
"date": 2020-04-27T10:35:43.272Z,
- "message": "xxxxx",
+ "message": " xxxxx",
}
`);
});
@@ -116,7 +116,7 @@ describe("", () => {
expect(messageWithoutKey).toMatchInlineSnapshot(`
Object {
"date": 2019-06-12T10:55:42.459Z,
- "message": "\\"This is a message.\\"",
+ "message": " \\"This is a message.\\"",
}
`);
});
@@ -124,7 +124,9 @@ describe("", () => {
describe("render html correctly", () => {
const RealDate = Date;
beforeAll(() => {
- global.Date = class extends RealDate {
+ global.Date = class extends (
+ RealDate
+ ) {
constructor(arg) {
if (arg) {
return new RealDate(arg);
@@ -144,7 +146,7 @@ describe("", () => {
await wrapper.vm.$nextTick();
expect(wrapper.find("ul.events")).toMatchInlineSnapshot(`
- - "This is a message."
+ - "This is a message."
`);
});
@@ -159,7 +161,7 @@ describe("", () => {
await wrapper.vm.$nextTick();
expect(wrapper.find("ul.events")).toMatchInlineSnapshot(`
- - blackwhite
+ - blackwhite
`);
});
@@ -174,7 +176,7 @@ describe("", () => {
await wrapper.vm.$nextTick();
expect(wrapper.find("ul.events")).toMatchInlineSnapshot(`
- - <test>foo bar</test>
+ - <test>foo bar</test>
`);
});
@@ -192,7 +194,7 @@ describe("", () => {
await wrapper.vm.$nextTick();
expect(wrapper.find("ul.events")).toMatchInlineSnapshot(`
- - This is a test <hi></hi>
+ - This is a test <hi></hi>
`);
});
diff --git a/assets/components/LogEventSource.vue b/assets/components/LogEventSource.vue
index b6366f40..9679b69d 100644
--- a/assets/components/LogEventSource.vue
+++ b/assets/components/LogEventSource.vue
@@ -84,7 +84,7 @@ export default {
}
const key = data.substring(0, i);
const date = new Date(key);
- const message = data.substring(i).trim();
+ const message = data.substring(i);
return { key, date, message };
},
},
diff --git a/docker/client.go b/docker/client.go
index 2050a950..391f7269 100644
--- a/docker/client.go
+++ b/docker/client.go
@@ -145,7 +145,7 @@ func logReader(reader io.ReadCloser, tty bool) func() (string, error) {
if err != nil {
return "", err
}
- return strings.TrimSpace(buffer.String()), nil
+ return buffer.String(), nil
}
}