Skip to content

Commit

Permalink
Remove unecessary escapes (bluesky-social#2328)
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey authored Mar 16, 2024
1 parent 3d5ad92 commit 7dd9941
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/happy-pants-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@atproto/api': patch
---

Remove unecessary escapes from regex, which was causing a minification error when bundled in React Native.
4 changes: 1 addition & 3 deletions packages/api/src/moderation/mutewords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import { AppBskyActorDefs, AppBskyRichtextFacet } from '../client'
const REGEX = {
LEADING_TRAILING_PUNCTUATION: /(?:^\p{P}+|\p{P}+$)/gu,
ESCAPE: /[[\]{}()*+?.\\^$|\s]/g,
// @TODO tidy this
// eslint-disable-next-line no-useless-escape
SEPARATORS: /[\/\-\–\—\(\)\[\]\_]+/g,
SEPARATORS: /[/\-–—()[\]_]+/g,
WORD_BOUNDARY: /[\s\n\t\r\f\v]+?/g,
}

Expand Down

0 comments on commit 7dd9941

Please sign in to comment.