Since 0.36.0, The link-image-style rule (MD054), with { "shortcut": false } or { "url_inline": false } option, throws an error when markdown has mail surround <> (e.g. <foo@example.com>, _CODE_OFCONDUCT.md):
/home/regseb/testcase/node_modules/markdownlint/lib/md054.js:54
destination = getDescendantsByType(link, [ "autolinkProtocol" ])[0].text;
^
TypeError: Cannot read properties of undefined (reading 'text')
at Object.function (/home/regseb/testcase/node_modules/markdownlint/lib/md054.js:54:76)
at invokeRuleFunction (/home/regseb/testcase/node_modules/markdownlint/lib/markdownlint.js:665:51)
at forRule (/home/regseb/testcase/node_modules/markdownlint/lib/markdownlint.js:676:7)
at Array.map (<anonymous>)
at lintContent (/home/regseb/testcase/node_modules/markdownlint/lib/markdownlint.js:743:44)
at lintContentWrapper (/home/regseb/testcase/node_modules/markdownlint/lib/markdownlint.js:796:12)
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3)
Node.js v22.10.0
Since
0.36.0
, The link-image-style rule (MD054), with{ "shortcut": false }
or{ "url_inline": false }
option, throws an error when markdown has mail surround<>
(e.g.<foo@example.com>
, _CODE_OFCONDUCT.md):