Fix bug that happened to pass specs.

This commit is contained in:
Nathan Sobo
2012-02-10 12:51:32 -07:00
parent 479b64b654
commit 5fc9f68b47

View File

@@ -81,7 +81,7 @@ class LineWrapper
lineLength = lineText.length
return lineLength unless lineLength > @maxLength
if /\s/.test(tokensText[@maxLength])
if /\s/.test(lineText[@maxLength])
# search forward for the start of a word past the boundary
for column in [@maxLength..lineLength]
return column if /\S/.test(lineText[column])