Skip to content

v4.3.0

Choose a tag to compare

@deemonic deemonic released this 03 Nov 08:30
· 41 commits to main since this release
87f1bce

Behaviour Change

  • Blocked words now match inside longer words (#52): words passed to block() or set in the block config are caught inside longer words, so block('appleacre') flags crappleacre and block('foo') flags fooapple. Dictionary words still skip embedded matches (classroom stays clean), and allow() still overrides a blocked word.
Blasp::block('scam')->check('scampi');                    // now flagged
Blasp::block('scam')->allow('scampi')->check('scampi');   // clean

Bug Fixes

  • Emoji ZWJ sequences preserved (#50): clean() and original() no longer break emoji like 💆‍♀️. Invisible format characters are still stripped before matching, so f⁣uck is still caught, but only the masked words change in the returned text. Match positions now refer to the original text.
  • Callback masks passed to mask() now run once per match when the text contains invisible format characters.