Update to new textslice
This commit is contained in:
parent
f333a90fab
commit
3f730f1173
6 changed files with 40 additions and 34 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue