about summary refs log tree commit diff
path: root/src/view/lib/strings.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-11-04 17:56:48 -0500
committerPaul Frazee <pfrazee@gmail.com>2022-11-04 17:56:48 -0500
commit3f730f1173a3c27a6bd54b91f48ecb9220a42730 (patch)
tree05ee2d9a41ba4566f9a4eb15558e79ab7ebf0bc5 /src/view/lib/strings.ts
parentf333a90fab79d582bbb7f9114f0b005fdb1cae8b (diff)
downloadvoidsky-3f730f1173a3c27a6bd54b91f48ecb9220a42730.tar.zst
Update to new textslice
Diffstat (limited to 'src/view/lib/strings.ts')
-rw-r--r--src/view/lib/strings.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/view/lib/strings.ts b/src/view/lib/strings.ts
index 7f1bc545f..8dc63faa4 100644
--- a/src/view/lib/strings.ts
+++ b/src/view/lib/strings.ts
@@ -63,10 +63,10 @@ export function extractEntities(text: string): Entity[] | undefined {
     ents.push({
       type: 'mention',
       value: match[3],
-      index: [
-        match.indices[2][0], // skip the (^|\s) but include the '@'
-        match.indices[3][1],
-      ],
+      index: {
+        start: match.indices[2][0], // skip the (^|\s) but include the '@'
+        end: match.indices[3][1],
+      },
     })
   }
   return ents.length > 0 ? ents : undefined