From b34c55cc3cdaecd7aad66a7fbf613f90637b48d7 Mon Sep 17 00:00:00 2001 From: Artur Adib Date: Mon, 23 Jan 2012 15:29:15 -0500 Subject: [PATCH] Use ES5 .trim() --- src/fonts.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/fonts.js b/src/fonts.js index 5d0114476..f68ccd9ff 100644 --- a/src/fonts.js +++ b/src/fonts.js @@ -2596,9 +2596,7 @@ var Type1Parser = function type1Parser() { str = str.substr(start, count); - // Trim - str = str.replace(/^\s+/, ''); - str = str.replace(/\s+$/, ''); + str = str.trim(); // Remove adjacent spaces str = str.replace(/\s+/g, ' ');