Permalink
Browse files

[api] Output plain text with no formatting

  • Loading branch information...
1 parent 53671e8 commit d84bed6239eb45a390a2311f7f5e4019acf40608 @mmalecki committed Nov 28, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/ansiparse.js
View
@@ -4,7 +4,7 @@ ansiparse = function (str) {
//
var matchingControl = null,
matchingData = null,
- matchingText = null,
+ matchingText = '',
ansiState = [],
result = [],
state = {};
@@ -119,6 +119,10 @@ ansiparse = function (str) {
matchingText += str[i];
}
}
+
+ if (matchingText) {
+ result.push({ text: matchingText });
+ }
return result;
}

0 comments on commit d84bed6

Please sign in to comment.