Skip to content
Browse files

Merge pull request #3 from davethegr8/patch-1

Trim and remove 2 or more whitespace characters with just 1 space char
  • Loading branch information...
2 parents f926eb5 + 7e5b120 commit 47fdfdae5c798a3197f6d84f4444f85ec59f4156 @freqdec committed Feb 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 js/jquery.slabtext.js
View
2 js/jquery.slabtext.js
@@ -32,7 +32,7 @@
var $this = $(this),
keepSpans = $("span.slabtext", $this).length,
- words = keepSpans ? [] : String($this.text()).replace(/\s{2,}/g).split(" "),
+ words = keepSpans ? [] : String($.trim($this.text())).replace(/\s{2,}/g, " ").split(" "),
origFontSize = null,
idealCharPerLine = null,
fontRatio = settings.fontRatio,

0 comments on commit 47fdfda

Please sign in to comment.
Something went wrong with that request. Please try again.