Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix furry detector doesn’t match theta-delta in description #239

Merged
merged 1 commit into from
May 21, 2024

Conversation

KevSlashNull
Copy link
Collaborator

This fixes the weird behavior of the furry matcher as described here (internal). In short, in some cases (but not all!), descriptions containing the theta-delta therian symbols do not pass the furry detector, even though the regular expression allows it: /(Θ|θ)(∆|Δ)/.

The reason for this outlier behavior is due to lowercasing the description, which we do for simpler comparisons, as JavaScript doesn’t have a case-insentitive strings.EqualFold comparison. The detector passes when the profile descriptions contains an increment operator (Δ) but not an uppercase delta (Δ) as the updated description would contain a lowercase delta (δ) at time of regex check.

To fix this, this adds the i ignore-case modifier to the therian regex, allowing also θδ as side-effect.

@KevSlashNull KevSlashNull requested a review from strideynet May 20, 2024 21:45
Copy link

vercel bot commented May 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bsky-furry-feed-admin ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 20, 2024 9:45pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
bsky-furry-feed-info ⬜️ Ignored (Inspect) May 20, 2024 9:45pm

@KevSlashNull
Copy link
Collaborator Author

@strideynet, turns out, the bug i mentioned a few times was me being stoopid. 🙂

@KevSlashNull KevSlashNull merged commit 42b174e into main May 21, 2024
7 of 8 checks passed
@KevSlashNull KevSlashNull deleted the kevslashnull/admin-detector-therian-fix branch May 21, 2024 12:04
@KevSlashNull KevSlashNull added the frontend:admin Related to admin.furryli.st label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend:admin Related to admin.furryli.st
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants