Open danielhusar opened 9 years ago
A PR would be welcome. It would be good to maintain the API and add the functionality via a switch.
I would add option truncate: string
that would truncate the snippet to a max. of n
characters and add an ellipsis (...
). The truncate option could take an instruction string like 50 words
/100 chars
/1 sentence/ comment
. comment
would refer to #41. I don't think specifying a minimum is a common need for an excerpt.
What you guys thinks about adding functionality to specify either number of paragraphs to take, or minimum characters. (so if first paragraph have less than minimum characters, take also next one and so on..)
I can prepare PR if you are interested in it.