Fix for multiple at-mentions
This commit is contained in:
parent
6fec6b2646
commit
e58975ec8b
4 changed files with 44 additions and 15 deletions
|
@ -115,19 +115,20 @@ story.add('@Mention', () => {
|
|||
|
||||
story.add('Multiple @Mentions', () => {
|
||||
const props = createProps({
|
||||
// These are intentionally in a mixed order to test how we deal with that
|
||||
bodyRanges: [
|
||||
{
|
||||
start: 4,
|
||||
length: 1,
|
||||
mentionUuid: 'abc',
|
||||
replacementText: 'Professor Farnsworth',
|
||||
},
|
||||
{
|
||||
start: 2,
|
||||
length: 1,
|
||||
mentionUuid: 'def',
|
||||
replacementText: 'Philip J Fry',
|
||||
},
|
||||
{
|
||||
start: 4,
|
||||
length: 1,
|
||||
mentionUuid: 'abc',
|
||||
replacementText: 'Professor Farnsworth',
|
||||
},
|
||||
{
|
||||
start: 0,
|
||||
length: 1,
|
||||
|
@ -144,18 +145,19 @@ story.add('Multiple @Mentions', () => {
|
|||
story.add('Complex MessageBody', () => {
|
||||
const props = createProps({
|
||||
bodyRanges: [
|
||||
{
|
||||
start: 80,
|
||||
length: 1,
|
||||
mentionUuid: 'xox',
|
||||
replacementText: 'Cereal Killer',
|
||||
},
|
||||
// These are intentionally in a mixed order to test how we deal with that
|
||||
{
|
||||
start: 78,
|
||||
length: 1,
|
||||
mentionUuid: 'wer',
|
||||
replacementText: 'Acid Burn',
|
||||
},
|
||||
{
|
||||
start: 80,
|
||||
length: 1,
|
||||
mentionUuid: 'xox',
|
||||
replacementText: 'Cereal Killer',
|
||||
},
|
||||
{
|
||||
start: 4,
|
||||
length: 1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue