【Bug】Several bugs occur when add link refer to in-article headings with footnotes

The following issues can be reproduced in a sandbox environment:

  1. When a heading with a footnote is set as a link, the last bracket of the link becomes isolated. I will attach two images showing this issue in both preview and non-preview link modes.
    image
    image

  2. When a heading title has two or more footnotes, if the link refer to that heading is in preview mode, and there is a hyperlink in the subsequent text of the article which using this link. a “failed to load image” icon will appear at the location of the hyperlink.
    image

  3. When entering a link refer to headings with footnotes, if it is selected from a popup after typing [[Note Name#]], there will be meaningless spaces before the number in the footnote (It is estimated that the ^ in the footnote syntax is not displayed properly). Deleting the spaces does not affect the normal referencing of the double-bracket link. Refer to the images above for examples.