Permalink
Browse files

Version 2.1.7

Fixed issue #38, ECMA-48 detection issue.
  • Loading branch information...
Ben Garrett
Ben Garrett committed Mar 13, 2017
1 parent 390ee9d commit afee633eac41a91d70e36aba7fd26a7ca25d0966
Showing with 3 additions and 4 deletions.
  1. +1 −1 functions.js
  2. +1 −1 manifest.json
  3. +1 −2 test/example_files/ecma-48.txt
View
@@ -280,7 +280,7 @@ function findControlSequences(s = ``)
let a, b, c
// ECMA-48 control sequences (4/Feb/2017: despite the performance hit, need to run this first to avoid false detections)
if (s.trim().charCodeAt(0) === 27 && s.trim().charCodeAt(1) === 91) return `ecma48` // (16/Feb/2017: trim is needed for some ANSIs)
c = s.indexOf(`${String.fromCharCode(27)} ${String.fromCharCode(91)} `) // indexOf is the fastest form of string search
c = s.indexOf(`${String.fromCharCode(27)}${String.fromCharCode(91)}`) // indexOf is the fastest form of string search
if (c > 0) return `ecma48`
// make sure first char is an @-code
else if (t.charAt(0) === `@`) {
View
@@ -8,7 +8,7 @@
},
"name": "RetroTxt",
"description": "Turn many pieces of ANSI text art and ASCII/NFO plain text into HTML5 text.",
"version": "2.1.6",
"version": "2.1.7",
"version_name": "2.1",
"minimum_chrome_version": "49",
"default_locale": "en_US",
@@ -1,5 +1,4 @@
If the erasedisplay functionis working thistext should not bedisplayed.To display correctly this file needs be saved with CP-437 (US-OEM) encoding.
The start of the file MUST begin with an ECMA-48 escape sequence.
If the erasedisplay functionis working thistext should not bedisplayed.To display correctly this file needs be saved with CP-437 (US-OEM) encoding.
______________________ RetroTxt Proof Sheet����������������������ECMA-48 presentation control sequences
Normal textRed textBlue on greymagenta
Blue on greenRed textBlue on greymagentadefault colours

0 comments on commit afee633

Please sign in to comment.