more ritems fixes.

This commit is contained in:
Christopher Jeffrey 2015-04-24 11:39:40 -07:00
parent 096869d82e
commit 38cc1a3ea3
1 changed files with 2 additions and 1 deletions

View File

@ -5540,7 +5540,7 @@ List.prototype.pick = function(label, callback) {
self.hide();
self.screen.render();
if (!el) return callback();
return callback(null, helpers.cleanTags(self.items[selected]));
return callback(null, helpers.cleanTags(self.ritems[selected]));
});
};
@ -9116,6 +9116,7 @@ helpers.attrToBinary = function(style, element) {
};
helpers.cleanTags = function(text) {
if (!text) return text;
return text
.replace(/{(\/?)([\w\-,;!#]*)}/g, '')
.replace(/\x1b\[[\d;]*m/g, '')