- }
-
- let sText = _safeSubstring(text, 0, fuzzyLen);
- let result;
-
- // Symbols cannot be the first character in a new line.
- // In condition that a symbol appears at the beginning of the new line, we will move the last word of this line to the new line.
- // If there is only one word in this line, we will keep the first character of this word and move the rest of characters to the new line.
- if (WRAP_INSPECTION) {
- if (SYMBOL_REG.test(sLine || tmpText)) {
- result = LAST_WORD_REG.exec(sText);
- fuzzyLen -= result ? result[0].length : 0;
- if (fuzzyLen === 0) { fuzzyLen = 1; }
-
- sLine = _safeSubstring(text, fuzzyLen);
- sText = _safeSubstring(text, 0, fuzzyLen);
- }
- }
-
- // To judge whether a English words are truncated
- // If it starts with an English word in the next line and it ends with an English word in this line,