Merge pull request #1 from JamesMcFall/master

Hi Charlie, here's a bug fix and one new feature.
Merge pull request #2 from JamesMcFall/master

Error in trim() call
Fixing strip markup functionality when the string to truncate is shorter than the
requested length.
Merge remote-tracking branch 'upstream/master'