fix(utils): fix Markdown link replacement when link text is same as href (#7464)

This commit is contained in:
Joshua Chen 2022-05-22 19:13:28 +08:00 committed by GitHub
parent 5207e25291
commit 6e62bba30f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View file

@ -102,10 +102,10 @@ exports[`replaceMarkdownLinks replaces links with same title as URL 1`] = `
{
"brokenMarkdownLinks": [],
"newContent": "
[/docs/foo](foo.md)
[/docs/foo](./foo.md)
[foo.md](/docs/foo)
[.//docs/foo](foo.md)
[./foo.md](/docs/foo)
[foo.md](/docs/foo)
[./foo.md](/docs/foo)
",
}
`;

View file

@ -204,7 +204,6 @@ The following operations are defined for [URI]s:
).toMatchSnapshot();
});
// FIXME
it('replaces links with same title as URL', () => {
expect(
replaceMarkdownLinks({