From a0ed4bd5a7e3287ff0272836ff3e3809d5faa576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Sun, 3 Apr 2016 19:05:55 +0200 Subject: [PATCH] Further tweak the display of the buffer dump. --- config-serializer/Serializable.ts | 5 +---- config-serializer/UhkBuffer.ts | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/config-serializer/Serializable.ts b/config-serializer/Serializable.ts index 9da35ba5..2a616805 100644 --- a/config-serializer/Serializable.ts +++ b/config-serializer/Serializable.ts @@ -22,10 +22,7 @@ abstract class Serializable { fromBinary(buffer: UhkBuffer): T { let indentation = new Array(Serializable.depth + 1).join(' '); let isArray = this instanceof UhkArray; - process.stdout.write(`${indentation}${this.constructor.name}.fromBinary: [`); - if (isArray) { - process.stdout.write('\n'); - } + process.stdout.write(`${indentation}${this.constructor.name}.fromBinary:` + (isArray ? '\n' : ' [')); Serializable.depth++; buffer.enableDump = !isArray; let value = this._fromBinary(buffer); diff --git a/config-serializer/UhkBuffer.ts b/config-serializer/UhkBuffer.ts index 9cd917ba..fea122af 100644 --- a/config-serializer/UhkBuffer.ts +++ b/config-serializer/UhkBuffer.ts @@ -142,7 +142,7 @@ class UhkBuffer { dump(value) { if (this.enableDump) { if (!UhkBuffer.isFirstElementToDump) { - process.stdout.write(' '); + process.stdout.write(', '); } process.stdout.write(value); if (UhkBuffer.isFirstElementToDump) {