* Fix short timeFormat

* Pause prompts now support MCI codes using View Controller
* View Controller 'noInput' option for read-only/viewable but no interaction
* Ability to omit final trailing CRLF's in ANSI's
* Move asset.displayArtAsset -> theme.displayThemedAsset
This commit is contained in:
Bryan Ashby 2015-07-25 16:10:12 -06:00
parent dd478ed6ba
commit 35a99b7e3e
10 changed files with 125 additions and 154 deletions

View file

@ -36,11 +36,13 @@ function ANSIEscapeParser(options) {
mciReplaceChar : '',
termHeight : 25,
termWidth : 80,
omitTrailingLF : false,
});
this.mciReplaceChar = miscUtil.valueWithDefault(options.mciReplaceChar, '');
this.termHeight = miscUtil.valueWithDefault(options.termHeight, 25);
this.termWidth = miscUtil.valueWithDefault(options.termWidth, 80);
this.omitTrailingLF = miscUtil.valueWithDefault(options.omitTrailingLF, false);
function getArgArray(array) {
@ -243,7 +245,11 @@ function ANSIEscapeParser(options) {
} while(0 !== re.lastIndex);
if(pos < buffer.length) {
parseMCI(buffer.slice(pos));
var lastBit = buffer.slice(pos);
if(self.omitTrailingLF && '\r\n' === lastBit.slice(-2).toString()) {
lastBit = lastBit.slice(pos, -2); // trim off last CRLF
}
parseMCI(lastBit)
}
self.emit('complete');