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(/:+/);