From f8569144eafd76cd64d8a2abb6c3b2a9cd797f55 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 24 Feb 2013 07:40:42 -0600 Subject: [PATCH] fix termcap parser --- lib/tput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tput.js b/lib/tput.js index 082ba41..86c5cfe 100644 --- a/lib/tput.js +++ b/lib/tput.js @@ -852,7 +852,7 @@ Tput.prototype.parseTermcap = function(data) { data = data.replace(/^#[^\n]+/gm, ''); // split entries - entries = data.split(/\n+/); + entries = data.trim().split(/\n+/); for (i = 0; i < entries.length; i++) { fields = entries[i].split(/:+/);