String.prototype.link is deprecated
Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/link
https://github.com/p01/mmd.js/blob/cd7f4872174bb29ef853f880119909dc70b7b4eb/mmd.js#L13
can change to
.replace(/\[([^\]]+)]\(([^(]+?)\)/g, `<a href="$2">$1</a>`)
I do not send the pull request. I think the author may be more convenient to modify, plus if there are any other slight changes in the future that can also be combined.
I am confused about why we need this change.
String.prototype is part of the latest Ecma 262 specification, it is actively supported by all common browser engines, and I have been using it in Node from version 8 to 16.
Does mmd.js fail to generate links for you ? In which environment ?
ECMA doesn't really deprecate anything. The ES implementations will. So if MDN is highlighting this as deprecated, it is a warning sign. I don't think it is just an MDN editing oversight, as the deprecation is present in Mozilla's browser-compat-data.
Replacing the use of String.prototype.link is both simple and encourages additions to the anchor tag, such as target="_blank" with either rel="noopener" or rel="noreferrer" to alleviate potential security and performance issues.
But you are quite correct to imply that this is in no way urgent.