Bug: duplicated links in metadataCache inside footnotes

Consider note

some image [^1]

[^1]: ![](<./myImage.png>)

If you get app.metadataCache.getFileCache(app.workspace.getActiveFile())

you will get cache with two identical embeds

{
  "embeds": [
    {
      "position": {
        "start": {
          "line": 3,
          "col": 6,
          "offset": 24
        },
        "end": {
          "line": 3,
          "col": 26,
          "offset": 44
        }
      },
      "link": "./myImage.png",
      "original": "![](<./myImage.png>)",
      "displayText": ""
    },
    {
      "position": {
        "start": {
          "line": 3,
          "col": 6,
          "offset": 24
        },
        "end": {
          "line": 3,
          "col": 26,
          "offset": 44
        }
      },
      "link": "./myImage.png",
      "original": "![](<./myImage.png>)",
      "displayText": ""
    }
  ],
  ...
}

This happens with wikilinks too. There will be a fix in 1.7.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.