-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/tienifr/expensify-common in…
…to fix/38001
- Loading branch information
Showing
6 changed files
with
61 additions
and
29 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 |
---|---|---|
|
@@ -304,15 +304,29 @@ test('Test markdown replacement for emojis with emails', () => { | |
+ '[😄[email protected]]([email protected]) ' | ||
+ '[😄 [email protected] ]([email protected]) ' | ||
const result = 'Do not replace the emoji with link ' | ||
+ '[😄](<a href="mailto:[email protected]">[email protected]</a>) ' | ||
+ '[😄]( <a href="mailto:[email protected]">[email protected]</a>) ' | ||
+ '[😄] <a href="mailto:[email protected]">[email protected]</a> ' | ||
+ '[😄]((<a href="mailto:[email protected]">[email protected]</a>)) ' | ||
+ '[😄<a href="mailto:[email protected]">[email protected]</a>](<a href="mailto:[email protected]">[email protected]</a>) ' | ||
+ '[😄 <a href="mailto:[email protected]">[email protected]</a> ](<a href="mailto:[email protected]">[email protected]</a>) ' | ||
+ '[<emoji>😄</emoji>](<a href="mailto:[email protected]">[email protected]</a>) ' | ||
+ '[<emoji>😄</emoji>]( <a href="mailto:[email protected]">[email protected]</a>) ' | ||
+ '[<emoji>😄</emoji>] <a href="mailto:[email protected]">[email protected]</a> ' | ||
+ '[<emoji>😄</emoji>]((<a href="mailto:[email protected]">[email protected]</a>)) ' | ||
+ '[<emoji>😄</emoji><a href="mailto:[email protected]">[email protected]</a>](<a href="mailto:[email protected]">[email protected]</a>) ' | ||
+ '[<emoji>😄</emoji> <a href="mailto:[email protected]">[email protected]</a> ](<a href="mailto:[email protected]">[email protected]</a>) ' | ||
expect(parser.replace(testString)).toBe(result); | ||
}); | ||
|
||
test('Test markdown replacement for composite emoji', () => { | ||
const testString = 'Replace composite emoji with only one emoji tag ' | ||
+ '😶🌫️ ' | ||
+ '🧑🔧 ' | ||
+ '👨🏫 ' | ||
+ '👨🏾❤️👨🏽 ' | ||
const result = 'Replace composite emoji with only one emoji tag ' | ||
+ '<emoji>😶🌫️</emoji> ' | ||
+ '<emoji>🧑🔧</emoji> ' | ||
+ '<emoji>👨🏫</emoji> ' | ||
+ '<emoji>👨🏾❤️👨🏽</emoji> ' | ||
expect(parser.replace(testString)).toBe(result); | ||
}) | ||
|
||
|
||
// Markdown style links replaced successfully | ||
test('Test markdown style links', () => { | ||
|
@@ -1123,7 +1137,7 @@ test('Test for link with no content', () => { | |
|
||
test('Test for link with emoji', () => { | ||
const testString = '[😀](www.link.com)'; | ||
const resultString = '[😀](<a href="https://www.link.com" target="_blank" rel="noreferrer noopener">www.link.com</a>)'; | ||
const resultString = '[<emoji>😀</emoji>](<a href="https://www.link.com" target="_blank" rel="noreferrer noopener">www.link.com</a>)';; | ||
expect(parser.replace(testString)).toBe(resultString); | ||
}); | ||
test('Test quotes markdown replacement with heading inside', () => { | ||
|
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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