Closed gjtorikian closed 4 months ago
Why do you think not many (or none) uses text filters? Curious if I'm doing something wrong (https://github.com/Starkast/wikimum/pull/590/files#diff-f76e24ef86d4ffadf31658baddaf98cdf97a1186cfa61f2a41d735b3a878dac0)
Re: the breaking change, it's okay, I have tests. Promises about SemVer is not to be trusted :)
Because they don’t really “do” anything special. They’re kind of just elaborately structured gsub
statements! But obviously I use them too and I’m happy they work for you too!
This shouldn't be too disruptive for folks using
TextFilter
, but is a breaking change nonetheless. Yes, SemVer dictates that I bump a major release, but I don't think many, if anybody, uses text filters, and I don't want to signal a major change for arguably the more important functions of this library, which is to take markup and turn it into safe HTML.None of the behavior related to HTML manipulation or node filters are changing. Instead,
TextFilter
s should now be instantiated just like node filters:That's it.