Prepped ANSI is working very well + ANSI in FSE pristine in *most* cases

Moved prepAnsi() -> ansi_prep.js as ansiPrep (single export)
This commit is contained in:
Bryan Ashby 2017-08-28 23:17:35 -06:00
parent 1bad0de5c1
commit 9379c7f5e7
7 changed files with 238 additions and 31 deletions

View file

@ -10,11 +10,13 @@ const Errors = require('./enig_error.js').Errors;
const ANSI = require('./ansi_term.js');
const {
prepAnsi, isAnsi, isFormattedLine,
isAnsi, isFormattedLine,
splitTextAtTerms,
renderSubstr
} = require('./string_util.js');
const ansiPrep = require('./ansi_prep.js');
// deps
const uuidParse = require('uuid-parse');
const async = require('async');
@ -496,7 +498,7 @@ Message.prototype.getQuoteLines = function(options, cb) {
}
if(options.isAnsi) {
prepAnsi(
ansiPrep(
this.message.replace(/\r?\n/g, '\r\n'), // normalized LF -> CRLF
{
termWidth : options.termWidth,