In order to be able to truncate a text to a certain amount of sentences, I added a new param called toTruncate. The function will truncate the text on the basis of the first length param. It will count the characters and set the sentence after the given amount of characters, depending on the length of the sentence of course. So if you want to truncate your text always to the first sentence, just set the length to 1.
added new "toSentence" param to existing truncate filter to be able t…
…o truncate sentences to a certain length
extracted code into separate function