`footnote` and `footnoteReference` in headings cause links in links
wooorm opened this issue · 0 comments
wooorm commented
Subject of the issue
We allow phrasing content in headings, and copy those over to the links in the toc:
6fbb123
You don’t want links in links, so we ignore those:
mdast-util-toc/lib/contents.js
Lines 123 to 125 in 94cbac8
But footnotes and footnote references (which previously came from remark but are now in remark-footnotes) also result in links. Thus creating a in as, which is nonconforming HTML.
Your environment
n/a
Steps to reproduce
# Heading[^1]Expected behaviour
- [Heading](#heading)Actual behaviour
- [Heading[^1]](#heading)