summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/color_code.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/color_code.js b/js/color_code.js
index c27f2bb..7811d82 100644
--- a/js/color_code.js
+++ b/js/color_code.js
@@ -232,7 +232,12 @@ var MircColor = (function(){
}
function ascii (rows) {
var lines = rows.map(function(str){
- return str.map(function(index){ return "\\x031," + index + " " }).join("")
+ var last = -1
+ return str.map(function(index){
+ if (last == index) return " "
+ last = index
+ return "\\x031," + index + " "
+ }).join("")
}).join("\\n")
var txt = '/exec -out printf "' + lines + '"\n'
return txt