-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #687 from software-mansion-labs/@robertKozik/phone…
…-mention-raw-input Create explicit `rawInputReplacement` function for userMentions
- Loading branch information
Showing
2 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1813,6 +1813,12 @@ describe('when should keep raw input flag is enabled', () => { | |
const resultString = '<a href="mailto:[email protected]" data-raw-href="mailto:[email protected]" data-link-variant="labeled"><strong>mail</strong></a>'; | ||
expect(parser.replace(testString, {shouldKeepRawInput: true})).toBe(resultString); | ||
}); | ||
|
||
test('user mention from phone number', () => { | ||
const testString = '@+1234567890'; | ||
const resultString = '<mention-user>@+1234567890</mention-user>'; | ||
expect(parser.replace(testString, {shouldKeepRawInput: true})).toBe(resultString); | ||
}); | ||
}); | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters