Closed stevehansell closed 10 years ago
Currently, calling downsize("A string without HTML", {words: 2, append: '...'} returns A string.
downsize("A string without HTML", {words: 2, append: '...'}
A string
I changed (stack.length || tagBuffer.length) to isAtLimit(), which solves this issue and makes that line a little more clear.
(stack.length || tagBuffer.length)
isAtLimit()
Tests included.
Looks good and doesn't break any tests :)
Currently, calling
downsize("A string without HTML", {words: 2, append: '...'}
returnsA string
.I changed
(stack.length || tagBuffer.length)
toisAtLimit()
, which solves this issue and makes that line a little more clear.Tests included.