about summary refs log tree commit diff
path: root/src/view/com/util/RichText.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-11-29 09:35:10 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-11-29 09:35:10 -0600
commit2ccbe4f702dbb41bf466cc6dea1d5ee212b6dafb (patch)
tree64dee4f201b830ea7d975c07e1d22052272c8509 /src/view/com/util/RichText.tsx
parent57f2d1d59fb4ce435fef6f99b84db6d7b4667127 (diff)
downloadvoidsky-2ccbe4f702dbb41bf466cc6dea1d5ee212b6dafb.tar.zst
Relax the requirement that post entities match their value
Diffstat (limited to 'src/view/com/util/RichText.tsx')
-rw-r--r--src/view/com/util/RichText.tsx9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/view/com/util/RichText.tsx b/src/view/com/util/RichText.tsx
index 8b4e6a50a..3f0e99087 100644
--- a/src/view/com/util/RichText.tsx
+++ b/src/view/com/util/RichText.tsx
@@ -81,13 +81,8 @@ function* toSegments(text: string, entities: Entity[]) {
     }
     if (currEnt.index.start < currEnt.index.end) {
       let subtext = text.slice(currEnt.index.start, currEnt.index.end)
-      if (
-        !subtext.trim() ||
-        (currEnt.type === 'mention' &&
-          stripUsername(subtext) !== stripUsername(currEnt.value)) ||
-        (currEnt.type === 'link' && !isSameLink(subtext, currEnt.value))
-      ) {
-        // dont yield links to empty strings or strings that don't match the entity value
+      if (!subtext.trim()) {
+        // dont yield links to empty strings
         yield subtext
       } else {
         yield {