cocur/slugify — pull request #44 by acelaya (2014-09-23 20:48:20+00:00)
Title: Ease extension of Slugify class

I made a few minor changes.

Changed the visibility of rules and rulesets properties to allow them to ve overriden if extending Slugify.
Maybe using a getter for the rules property would do the same job, but this was my approach.

Added a third optional param to the `slufigy` method with the regular expression to be applied to the string.
I made this because I needed to allow other characters in the slug, like dots for filenames. I didn't want `My Cool File.zip` to become `my-cool-file-zip` but `my-cool-file.zip`.
I wasn't sure if that argument should be set in the constructor or in this method, but I think this is good enough.

I was thinking also on giving the option to define if the string should be lowered or not, but I'm not sure what's the best way to do that.