// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`replaceMarkdownLinks does basic replace 1`] = `
{
  "brokenMarkdownLinks": [
    {
      "contentPaths": {
        "contentPath": "docs",
        "contentPathLocalized": "i18n/docs-localized",
      },
      "filePath": "docs/intro.md",
      "link": "hmmm.md",
    },
  ],
  "newContent": "
[foo](/doc/foo)
[baz](/doc/baz)
[foo](/doc/foo)
[http](http://github.com/facebook/docusaurus/README.md)
[https](https://github.com/facebook/docusaurus/README.md)
[asset](./foo.js)
[asset as well](@site/docs/_partial.md)
[looks like http...](/doc/http)
[nonexistent](hmmm.md)
",
}
`;

exports[`replaceMarkdownLinks ignores links in HTML comments 1`] = `
{
  "brokenMarkdownLinks": [
    {
      "contentPaths": {
        "contentPath": "docs",
        "contentPathLocalized": "i18n/docs-localized",
      },
      "filePath": "docs/intro.md",
      "link": "./foo.md",
    },
    {
      "contentPaths": {
        "contentPath": "docs",
        "contentPathLocalized": "i18n/docs-localized",
      },
      "filePath": "docs/intro.md",
      "link": "./foo.md",
    },
  ],
  "newContent": "
<!-- [foo](./foo.md) -->
<!--
[foo](./foo.md)
-->
",
}
`;

exports[`replaceMarkdownLinks ignores links in fenced blocks 1`] = `
{
  "brokenMarkdownLinks": [],
  "newContent": "
\`\`\`
[foo](foo.md)
\`\`\`

\`\`\`\`js
[foo](foo.md)
\`\`\`
[foo](foo.md)
\`\`\`
[foo](foo.md)
\`\`\`\`

\`\`\`\`js
[foo](foo.md)
\`\`\`
[foo](foo.md)
\`\`\`\`
",
}
`;

exports[`replaceMarkdownLinks ignores links in inline code 1`] = `
{
  "brokenMarkdownLinks": [
    {
      "contentPaths": {
        "contentPath": "docs",
        "contentPathLocalized": "i18n/docs-localized",
      },
      "filePath": "docs/intro.md",
      "link": "foo.md",
    },
  ],
  "newContent": "
\`[foo](foo.md)\`
",
}
`;

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

exports[`replaceMarkdownLinks replaces multiple links on same line 1`] = `
{
  "brokenMarkdownLinks": [],
  "newContent": "
[a](/docs/a), [a](/docs/a), [b](/docs/b), [c](/docs/c)
",
}
`;

exports[`replaceMarkdownLinks replaces reference style Markdown links 1`] = `
{
  "brokenMarkdownLinks": [],
  "newContent": "
The following operations are defined for [URI]s:

* [info]: Returns metadata about the resource,
* [list]: Returns metadata about the resource's children (like getting the content of a local directory).

[URI]:    /docs/api/classes/uri
[info]:   /docs/api/classes/uri#info
[list]:   /docs/api/classes/uri#list
      ",
}
`;

exports[`replaceMarkdownLinks replaces two links on the same line 1`] = `
{
  "brokenMarkdownLinks": [],
  "newContent": "[TypeScript](/programming-languages/typescript/) and [Go](/programming-languages/go/)",
}
`;

exports[`replaceMarkdownLinks resolves absolute and relative links differently 1`] = `
{
  "brokenMarkdownLinks": [
    {
      "contentPaths": {
        "contentPath": "docs",
        "contentPathLocalized": "i18n/docs-localized",
      },
      "filePath": "docs/intro/intro.md",
      "link": "./api/classes/divine_uri.URI.md",
    },
    {
      "contentPaths": {
        "contentPath": "docs",
        "contentPathLocalized": "i18n/docs-localized",
      },
      "filePath": "docs/intro/intro.md",
      "link": "/another.md",
    },
  ],
  "newContent": "
[Relative link](/docs/another)
[Relative link 2](/docs/api/classes/uri)
[Relative link that should be absolute](./api/classes/divine_uri.URI.md)
[Absolute link](/docs/api/classes/uri)
[Absolute link from site dir](/docs/api/classes/uri)
[Absolute link that should be relative](/another.md)
[Relative link that acts as absolute](/docs/api/classes/uri)
[Relative link that acts as relative](/docs/another)
",
}
`;
