Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Handle empty ANSI color escapes #3

Merged
merged 1 commit into from

2 participants

@sodabrew

This is how I did it, btw:

# git clone ansi_up
# git checkout -t -b empty_colors
git --git-dir=../rq/.git format-patch -k -1 --stdout 427c0e95e0a73f593117dda07aef45360068de63 | git am -3 -k
@drudru drudru merged commit c678490 into drudru:master
@drudru
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 26, 2014
  1. @sodabrew
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 ansi_up.js
View
4 ansi_up.js
@@ -67,7 +67,7 @@
// Do proper handling of sequences (aka - injest vi split(';') into state machine
//match,codes,txt = text.match(/([\d;]+)m(.*)/m);
- var matches = text.match(/([\d;]+?)m([^]*)/m);
+ var matches = text.match(/([\d;]*)m([^]*)/m);
if (!matches) return text;
@@ -79,7 +79,7 @@
var num = parseInt(num_str);
- if (num === 0) {
+ if (isNaN(num) || num === 0) {
self.fg = self.bg = null;
self.bright = 0;
} else if (num === 1) {
Something went wrong with that request. Please try again.