From 3f730f1173a3c27a6bd54b91f48ecb9220a42730 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Fri, 4 Nov 2022 17:56:48 -0500 Subject: Update to new textslice --- src/view/lib/strings.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/view/lib/strings.ts') 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 -- cgit 1.4.1