punkave/apostrophe — pull request #149 by pixeleet (2014-07-21 14:30:47+00:00)
Title: allow ending through truncate, just like nunjucks would let you do

Originally Nunjucks provides the following function
truncate: function(input, length, killwords, end)
Apos also has the possibilty to add an ending
self.truncatePlaintext = function(str, length, pruneStr)

Then Nunjucks truncate function is overwritten by apos, but originally without the ending
nunjucksEnv.addFilter('truncate', function(data, limit) {
return self.truncatePlaintext(data, limit);
});

this small fix lets it through so I can change the ending dynamically ;)