Bluesky app fork with some witchin' additions 💫 witchsky.app
bluesky fork client
117
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update emoji regex to detect variations and sequences (#10138)

authored by

DS Boyce and committed by
GitHub
8ac63d78 0419066f

+8 -5
+8 -5
src/alf/typography.tsx
··· 1 1 import {Children} from 'react' 2 - import {type TextProps as RNTextProps} from 'react-native' 3 - import {type StyleProp, type TextStyle} from 'react-native' 2 + import { 3 + type StyleProp, 4 + type TextProps as RNTextProps, 5 + type TextStyle, 6 + } from 'react-native' 4 7 import {UITextView} from 'react-native-uitextview' 5 8 import createEmojiRegex from 'emoji-regex' 6 9 7 10 import {type Alf, applyFonts, atoms, flatten} from '#/alf' 8 - import {IS_NATIVE} from '#/env' 9 - import {IS_IOS} from '#/env' 11 + import {IS_IOS, IS_NATIVE} from '#/env' 10 12 11 13 /** 12 14 * Ensures that `lineHeight` defaults to a relative value of `1`, or applies ··· 107 109 }) 108 110 } 109 111 110 - const SINGLE_EMOJI_RE = /^[\p{Emoji_Presentation}\p{Extended_Pictographic}]+$/u 112 + const SINGLE_EMOJI_RE = 113 + /^[\p{Emoji_Presentation}\p{Extended_Pictographic}\uFE0F\u200D]+$/u 111 114 export function isOnlyEmoji(text: string) { 112 115 return text.length <= 15 && SINGLE_EMOJI_RE.test(text) 113 116 }