From 94cc84bad0c0a97f6d5de3ee4964385386f991b0 Mon Sep 17 00:00:00 2001 From: Dru Nelson Date: Thu, 16 Mar 2023 16:00:30 -0500 Subject: [PATCH] Fixes #72 --- ansi_up.js | 11 ++++++++--- ansi_up.ts | 23 ++++++++++++++++++----- dist/ansi_up.js.include | 11 ++++++++--- dist/ansi_up.js.map | 2 +- test/ansi_up-test.js | 12 ++++++++++++ 5 files changed, 47 insertions(+), 12 deletions(-) diff --git a/ansi_up.js b/ansi_up.js index 58052c2..7246120 100644 --- a/ansi_up.js +++ b/ansi_up.js @@ -151,12 +151,12 @@ var AnsiUp = (function () { return pkt; } if (pos == 0) { - if (len == 1) { + if (len < 3) { pkt.kind = PacketKind.Incomplete; return pkt; } var next_char = this._buffer.charAt(1); - if ((next_char != '[') && (next_char != ']')) { + if ((next_char != '[') && (next_char != ']') && (next_char != '(')) { pkt.kind = PacketKind.ESC; pkt.text = this._buffer.slice(0, 1); this._buffer = this._buffer.slice(1); @@ -186,7 +186,7 @@ var AnsiUp = (function () { this._buffer = this._buffer.slice(rpos); return pkt; } - if (next_char == ']') { + else if (next_char == ']') { if (len < 4) { pkt.kind = PacketKind.Incomplete; return pkt; @@ -245,6 +245,11 @@ var AnsiUp = (function () { this._buffer = this._buffer.slice(rpos); return pkt; } + else if (next_char == '(') { + pkt.kind = PacketKind.Unknown; + this._buffer = this._buffer.slice(3); + return pkt; + } } }; AnsiUp.prototype.ansi_to_html = function (txt) { diff --git a/ansi_up.ts b/ansi_up.ts index 7bbddac..f2aaf8d 100644 --- a/ansi_up.ts +++ b/ansi_up.ts @@ -226,8 +226,9 @@ class AnsiUp // NOW WE HANDLE ESCAPES if (pos == 0) { - - if (len == 1) // Lone ESC in Buffer, We don't know yet + // All of the sequences typically need at least 3 characters + // So, wait until we have at least that many + if (len < 3) { pkt.kind = PacketKind.Incomplete; return pkt; @@ -236,8 +237,8 @@ class AnsiUp var next_char = this._buffer.charAt(1); // We treat this as a single ESC - // Which effecitvely shows - if ((next_char != '[') && (next_char != ']')) // DeMorgan + // No transformation + if ((next_char != '[') && (next_char != ']') && (next_char != '(')) { pkt.kind = PacketKind.ESC; pkt.text = this._buffer.slice(0, 1); @@ -333,7 +334,7 @@ class AnsiUp this._buffer = this._buffer.slice(rpos); return pkt; } - + else // OSC CHECK if (next_char == ']') { @@ -507,6 +508,18 @@ class AnsiUp this._buffer = this._buffer.slice(rpos); return pkt; } + else + // Other ESC CHECK + if (next_char == '(') + { + // This specifies the character set, which + // should just be ignored + + // We have at least 3, so drop the sequence + pkt.kind = PacketKind.Unknown; + this._buffer = this._buffer.slice(3); + return pkt; + } } } diff --git a/dist/ansi_up.js.include b/dist/ansi_up.js.include index 658e2f4..17583ef 100644 --- a/dist/ansi_up.js.include +++ b/dist/ansi_up.js.include @@ -132,12 +132,12 @@ var AnsiUp = (function () { return pkt; } if (pos == 0) { - if (len == 1) { + if (len < 3) { pkt.kind = PacketKind.Incomplete; return pkt; } var next_char = this._buffer.charAt(1); - if ((next_char != '[') && (next_char != ']')) { + if ((next_char != '[') && (next_char != ']') && (next_char != '(')) { pkt.kind = PacketKind.ESC; pkt.text = this._buffer.slice(0, 1); this._buffer = this._buffer.slice(1); @@ -167,7 +167,7 @@ var AnsiUp = (function () { this._buffer = this._buffer.slice(rpos); return pkt; } - if (next_char == ']') { + else if (next_char == ']') { if (len < 4) { pkt.kind = PacketKind.Incomplete; return pkt; @@ -226,6 +226,11 @@ var AnsiUp = (function () { this._buffer = this._buffer.slice(rpos); return pkt; } + else if (next_char == '(') { + pkt.kind = PacketKind.Unknown; + this._buffer = this._buffer.slice(3); + return pkt; + } } }; AnsiUp.prototype.ansi_to_html = function (txt) { diff --git a/dist/ansi_up.js.map b/dist/ansi_up.js.map index 940cb59..0f01980 100644 --- a/dist/ansi_up.js.map +++ b/dist/ansi_up.js.map @@ -1 +1 @@ -{"version":3,"file":"ansi_up.js","sourceRoot":"","sources":["../ansi_up.ts"],"names":[],"mappings":"AAMA,YAAY,CAAC;;;;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AE3B,IAAI,SAAS,GAAU,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAGtC,IAAI,KAAK,GAAG,gCAAgC,CAAC;IAC7C,IAAI,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACxC,OAAO,IAAI,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/test/ansi_up-test.js b/test/ansi_up-test.js index 2db13aa..6ec66c2 100644 --- a/test/ansi_up-test.js +++ b/test/ansi_up-test.js @@ -750,6 +750,18 @@ describe('ansi_up', function () { }); }); + describe('ignore controls beginning with ESC', function () { + + it('Designate G0 Character Set (UK)', function () { + var start = "foo\033(Abar"; + var au = new AnsiUp(); + var l = au.ansi_to_html(start); + l.should.eql('foobar'); + }); + + }); + + describe('buffering situations', function () { it('should transform an incomplete prefix', function () {