Skip to content

Conversation

@gabrielrbarbosa
Copy link
Contributor

Example in portuguese:
'Colar de pérola' would get incorrectly flagged as profanity because it contains the last 4 chars that is a bad word in pt_BR config.
After this fix: PASS No profanity found in your application!

\p{L} matches any Unicode letter.
(?<!\p{L}) ensures the character before isn’t a letter.
(?!\p{L}) ensures the character after isn’t a letter.
u flag = Unicode mode
i flag = case-insensitive

Example in portuguese: 
'Colar de pérola' would get incorrectly flagged as profanity because it contains the last 4 chars that is a bad word in pt_BR config.
@gabrielrbarbosa
Copy link
Contributor Author

Also one thing unrelated to this PR but I think could be removed is "sheet" from en config, because it is a common word for spreadsheet export right?

@JonPurvis
Copy link
Collaborator

Thanks for the contribution @gabrielrbarbosa

Are you able to take a look at the failing static analysis checks please? Happy to merge this once resolved.

@gabrielrbarbosa
Copy link
Contributor Author

@JonPurvis fixed style issue

@JonPurvis JonPurvis merged commit 1502f1b into pestphp:4.x Sep 9, 2025
14 checks passed
@JonPurvis
Copy link
Collaborator

Thanks for sorting! Interesting that you mentioned sheet, I had that crop up on a project yesterday! I ended up just adding --exclude=sheet into my composer script which did the trick. I'll have a think about whether we should just exclude it in the package core though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants