diff --git a/cocos2d/core/label/CCTextUtils.js b/cocos2d/core/label/CCTextUtils.js index 1253f43ce7..26c1621340 100644 --- a/cocos2d/core/label/CCTextUtils.js +++ b/cocos2d/core/label/CCTextUtils.js @@ -296,12 +296,14 @@ var TextUtils = { sText = text.substr(0, fuzzyLen); } } - if (sText.trim().length > 0) { + sText = sText.trim(); + if (sText.length > 0) { wrappedWords.push(sText); } text = sLine || tmpText; allWidth = measureText(text); } + text = text.trim(); if (text.length > 0) { wrappedWords.push(text); }