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

Handle apostrophes and other punctuation when muting words #2344

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

estrattonbailey
Copy link
Member

No description provided.

@@ -417,7 +495,7 @@ describe(`hasMutedWord`, () => {
outlineTags: [],
})

expect(match).toBe(false)
expect(match).toBe(true)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This update allows superbad to match super-bad, basically collapses the punctuation. Previously super bad would match super-bad but not the collapsed version.

This was done so that blueskys match Bluesky's. I'm trying to think of cases where this would be TOO eager, but haven't come up with anything yet.

@@ -474,7 +552,7 @@ describe(`hasMutedWord`, () => {
outlineTags: [],
})

expect(match).toBe(false)
expect(match).toBe(true)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here, collapses _ so idkwhatthiswouldbe matches idk_what_this_would_be

@estrattonbailey estrattonbailey marked this pull request as ready for review March 19, 2024 20:48
@estrattonbailey estrattonbailey changed the title Eric/muted apos Handle apostrophes and other punctuation when muting words Mar 19, 2024
Copy link
Collaborator

@pfrazee pfrazee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems solid to me

@estrattonbailey estrattonbailey merged commit abc6f82 into main Mar 19, 2024
10 checks passed
@estrattonbailey estrattonbailey deleted the eric/muted-apos branch March 19, 2024 20:59
@github-actions github-actions bot mentioned this pull request Mar 19, 2024
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