Link: https://github.com/markedjs/marked/issues/3440 Simplified code: https://github.com/markedjs/marked/issues/2134#issuecomment-2324630807 Relevant script as linked in the relevant Marked issue: https://github.com/MithrilJS/mithril.js/blob/64ae328f6213a83ae54dd42692b8b9a9ace52050/scripts/_lint-docs/process-file.js