diff options
author | Eric Bailey <git@esb.lol> | 2023-10-10 15:44:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-10 13:44:27 -0700 |
commit | fc28fc639fa20f8aceed2702d986ed239bb303e0 (patch) | |
tree | a6fbdc4cf5175800797550cce8451b0a1aaa5a2a /src | |
parent | d68b4ca856098679efa50295b942833f3f8246cf (diff) | |
download | voidsky-fc28fc639fa20f8aceed2702d986ed239bb303e0.tar.zst |
Don't highlight tags in composer yet (#1665)
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/composer/text-input/TextInput.tsx | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/view/com/composer/text-input/TextInput.tsx b/src/view/com/composer/text-input/TextInput.tsx index c5d094ea5..2810129f6 100644 --- a/src/view/com/composer/text-input/TextInput.tsx +++ b/src/view/com/composer/text-input/TextInput.tsx @@ -187,16 +187,19 @@ export const TextInput = forwardRef(function TextInputImpl( const textDecorated = useMemo(() => { let i = 0 - return Array.from(richtext.segments()).map(segment => ( - <Text - key={i++} - style={[ - !segment.facet ? pal.text : pal.link, - styles.textInputFormatting, - ]}> - {segment.text} - </Text> - )) + return Array.from(richtext.segments()).map(segment => { + const isTag = AppBskyRichtextFacet.isTag(segment.facet?.features?.[0]) + return ( + <Text + key={i++} + style={[ + segment.facet && !isTag ? pal.link : pal.text, + styles.textInputFormatting, + ]}> + {segment.text} + </Text> + ) + }) }, [richtext, pal.link, pal.text]) return ( |