-
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.
- Loading branch information
Showing
2 changed files
with
10 additions
and
9 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 |
---|---|---|
|
@@ -389,7 +389,8 @@ test('Test critical markdown style links', () => { | |
'[link with [brackets] inside of it](https://google.com) ' + | ||
'[link with smart quotes ‘’“”](https://google.com) ' + | ||
'[link with [email protected] email in it](https://google.com)' + | ||
'[Localhost](http://a:3030)'; | ||
'[Localhost](http://a:3030)' + | ||
'[ name with rear spaces ](https://example.com)'; | ||
const resultString = | ||
'Testing ' + | ||
'<a href="https://expensify.com" target="_blank" rel="noreferrer noopener"><del>strikethrough</del> <strong>bold</strong> <em>italic</em></a> ' + | ||
|
@@ -407,7 +408,8 @@ test('Test critical markdown style links', () => { | |
'<a href="https://google.com" target="_blank" rel="noreferrer noopener">link with [brackets] inside of it</a> ' + | ||
'<a href="https://google.com" target="_blank" rel="noreferrer noopener">link with smart quotes ‘’“”</a> ' + | ||
'<a href="https://google.com" target="_blank" rel="noreferrer noopener">link with [email protected] email in it</a>' + | ||
'<a href="http://a:3030" target="_blank" rel="noreferrer noopener">Localhost</a>'; | ||
'<a href="http://a:3030" target="_blank" rel="noreferrer noopener">Localhost</a>' + | ||
'<a href="https://example.com" target="_blank" rel="noreferrer noopener"> name with rear spaces </a>'; | ||
expect(parser.replace(testString)).toBe(resultString); | ||
}); | ||
|
||
|
@@ -1032,7 +1034,7 @@ test('Test markdown and url links with inconsistent starting and closing parens' | |
'[Text text] more text (<a href="https://www.google.com" target="_blank" rel="noreferrer noopener">link [square brackets within] here</a>)' + | ||
'[Text text] more text (<a href="https://www.google.com" target="_blank" rel="noreferrer noopener">link (parenthesis within) here</a>)' + | ||
'[Text text] more text <a href="https://www.google.com" target="_blank" rel="noreferrer noopener">link here</a>' + | ||
'[Text text] more text (<a href="https://www.google.com" target="_blank" rel="noreferrer noopener">link here</a>)' + | ||
'[Text text] more text (<a href="https://www.google.com" target="_blank" rel="noreferrer noopener">link here </a>)' + | ||
'[Text text] more text ((<a href="https://www.google.com" target="_blank" rel="noreferrer noopener">link here</a>))' + | ||
'[Text text] more text [(<a href="https://www.google.com" target="_blank" rel="noreferrer noopener">link here</a>)]' + | ||
'[Text text] more text (<a href="https://www.google.com" target="_blank" rel="noreferrer noopener">link here</a>)[Text text] more text (<a href="https://www.google.com" target="_blank" rel="noreferrer noopener">link here</a>)'; | ||
|
@@ -2270,7 +2272,7 @@ describe('room mentions', () => { | |
|
||
test('room mention with space inside link should not be rendered', () => { | ||
const testString = '[ #room](google.com/sub#111)'; | ||
const resultString = '<a href="https://google.com/sub#111" target="_blank" rel="noreferrer noopener">#room</a>'; | ||
const resultString = '<a href="https://google.com/sub#111" target="_blank" rel="noreferrer noopener"> #room</a>'; | ||
expect(parser.replace(testString)).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