-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for properly parsing scheme urls after non-scheme-chars preceed them
- Loading branch information
1 parent
0bf34a3
commit e239b9a
Showing
9 changed files
with
87 additions
and
16 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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
Large diffs are not rendered by default.
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
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 |
---|---|---|
|
@@ -25,7 +25,9 @@ describe('Live example page -', function () { | |
it('should correctly load Autolinker and display the output with the default settings', async () => { | ||
// Path to the index.html file of the live example *from the output | ||
// directory of this .spec file* (i.e. './.tmp/tests-integration/live-example') | ||
const pathToHtmlFile = path.normalize(`${__dirname}/../../../docs/examples/index.html`); | ||
const pathToHtmlFile = path.normalize( | ||
`${__dirname}/../../../docs/examples/live-example/index.html` | ||
); | ||
if (!fs.existsSync(pathToHtmlFile)) { | ||
throw new Error( | ||
`The live example index.html file was not found at path: '${pathToHtmlFile}'\nDid the location of the file (or the output location of this .spec file) change? The file should be referenced from the root-level './docs/examples' folder in the repo` | ||
|
@@ -39,8 +41,8 @@ describe('Live example page -', function () { | |
expect(autolinkerOutputHtml).toBe( | ||
[ | ||
`<a href="http://google.com" target="_blank" rel="noopener noreferrer">google.com</a><br>`, | ||
`<a href="http://www.google.com" target="_blank" rel="noopener noreferrer">google.com</a><br>`, | ||
`<a href="http://google.com" target="_blank" rel="noopener noreferrer">google.com</a><br>`, | ||
`<a href="http://192.168.0.1" target="_blank" rel="noopener noreferrer">192.168.0.1</a><br>`, | ||
`<a href="mailto:[email protected]" target="_blank" rel="noopener noreferrer">[email protected]</a><br>`, | ||
`<a href="tel:1234567890" target="_blank" rel="noopener noreferrer">123-456-7890</a><br>`, | ||
`@MentionUser<br>`, | ||
|
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