Brett on 30 May, 2022 01:40 PM
If you search the support site, you’ll find that this is a long-standing issue. It’s due to a bug in the version of WebKit that Marked relies on, and that version is deprecated by Apple and the bug is unlikely to be fixed.
Marked may eventually be refactored to use a version of WebKit that fixes this issue, but at present that would result in the loss of a significant amount of other functionality.
One option is to export html from Marked, including scripts and styles, and then open in a current version of Safari or Firefox and print to PDF. You lose Marked‘s headers and footers, but the TOC links will work.