rd.length &gt; this.wrapLength) {</span>
<span class="hl str">          lines.push(line);</span>
<span class="hl str">          line = word;</span>
<span class="hl str">        } else if (line.length) {</span>
<span class="hl str">          line += '</span> <span class="hl str">' + word;</span>
<span class="hl str">        } else {</span>
<span class="hl str">          line = word;</span>
<span class="hl str">        }</span>
<span class="hl str">      }</span>
<span class="hl str">      if (line.length) {<