{"_id":"markdown-it-replace-link","_rev":"1506234","name":"markdown-it-replace-link","description":"markdown-it plugin for replacing links (image & text) in the markdown document.","dist-tags":{"latest":"1.2.2"},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"time":{"modified":"2026-10-01T21:48:02.000Z","created":"2015-05-13T16:56:37.572Z","1.2.2":"2024-11-20T11:21:40.364Z","1.2.1":"2024-01-05T03:04:58.321Z","1.2.0":"2023-01-25T11:14:01.546Z","1.1.0":"2020-06-09T16:54:33.741Z","1.0.1":"2017-02-15T17:32:46.543Z","1.0.0":"2015-05-13T16:56:37.572Z"},"users":{"luoyjx":true,"ubenzer":true},"author":{"name":"Martin Heidegger"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/markdown-it-replace-link.git"},"versions":{"1.2.2":{"name":"markdown-it-replace-link","version":"1.2.2","description":"markdown-it plugin for replacing links (image & text) in the markdown document.","main":"index.js","scripts":{"test":"npm run lint; npm run unit","unit":"mocha -R spec","lint":"standard"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/markdown-it-replace-link.git"},"keywords":["markdown","markdown-it","markdown-it-plugin"],"author":{"name":"Martin Heidegger"},"license":"MIT","bugs":{"url":"https://github.com/martinheidegger/markdown-it-replace-link/issues"},"homepage":"https://github.com/martinheidegger/markdown-it-replace-link","devDependencies":{"dom-serializer":"^2.0.0","htmlparser2":"^9.1.0","markdown-it":"^14.1.0","markdown-it-testgen":"*","mocha":"^10.8.2","standard":"^17.1.2"},"peerDependencies":{"@types/markdown-it":"*","markdown-it":"*"},"optionalDependencies":{"dom-serializer":"^2.0.0","htmlparser2":"^8.0.1"},"_id":"markdown-it-replace-link@1.2.2","gitHead":"1e36e4020ec66453bcbc4b53fdc8578756692145","types":"./index.d.ts","_nodeVersion":"20.18.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-JpeY+TMKqttF+tZQDmkFxXs/8PTohFvw4Z76h98O06ZEx66PNd1wMV0Odp094O/mvvf6iOnjdHpTKAfDUwhH1A==","shasum":"b9fbfaed2d49181ffa7846568afeb7e561385b3e","tarball":"http://registry-npm.ywwl.com/markdown-it-replace-link/download/markdown-it-replace-link-1.2.2.tgz","fileCount":10,"unpackedSize":9973,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDEqqtQvBQgf7ZRE4KbQkEcCFICBtaE8Eu887NlyPg+zAiAWTuHklu73jh32qojmOADf5ha5dREZCk/8eR/6DRDd4w=="}],"size":3765,"noattachment":false,"key":"/markdown-it-replace-link/-/markdown-it-replace-link-1.2.2.tgz"},"_npmUser":{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},"directories":{},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-it-replace-link_1.2.2_1732101700187_0.5160477710244484"},"_hasShrinkwrap":false,"publish_time":1732101700364,"_cnpm_publish_time":1732101700364},"1.2.1":{"name":"markdown-it-replace-link","version":"1.2.1","description":"markdown-it plugin for replacing links (image & text) in the markdown document.","main":"index.js","scripts":{"test":"npm run lint; npm run unit","unit":"mocha -R spec","lint":"standard"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/markdown-it-replace-link.git"},"keywords":["markdown","markdown-it","markdown-it-plugin"],"author":{"name":"Martin Heidegger"},"license":"MIT","bugs":{"url":"https://github.com/martinheidegger/markdown-it-replace-link/issues"},"homepage":"https://github.com/martinheidegger/markdown-it-replace-link","devDependencies":{"markdown-it":"^13.0.1","markdown-it-testgen":"*","mocha":"^10.2.0","standard":"^17.0.0"},"peerDependencies":{"@types/markdown-it":"*","markdown-it":"*"},"optionalDependencies":{"dom-serializer":"^2.0.0","htmlparser2":"^8.0.1"},"_id":"markdown-it-replace-link@1.2.1","gitHead":"bd940f15c98329ecb3aa93d11d9ee8a9fd96f8b3","types":"./index.d.ts","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-pRcJ1Gym1bwTqAJDB5n3JurF02aDRa5B+Jlvwg9zdBGza0zH7LJWxu2jD5mnTdt2LoSyuvqw+AgzTe5IVEWIYQ==","shasum":"9fe21c9753b6ea2b735426dc5f42ee1a04520efe","tarball":"http://registry-npm.ywwl.com/markdown-it-replace-link/download/markdown-it-replace-link-1.2.1.tgz","fileCount":10,"unpackedSize":9870,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG1hEv5uzk2hMQkyZqROWIiyj/h1wdb7j38IBlGtEADGAiEAlGd15uo30Rz/uB75p3Lac4quiqVcibkgaG2XkrA54to="}],"size":3707,"noattachment":false,"key":"/markdown-it-replace-link/-/markdown-it-replace-link-1.2.1.tgz"},"_npmUser":{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},"directories":{},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-it-replace-link_1.2.1_1704423898152_0.9780976773919758"},"_hasShrinkwrap":false,"publish_time":1704423898321,"_cnpm_publish_time":1704423898321},"1.2.0":{"name":"markdown-it-replace-link","version":"1.2.0","description":"markdown-it plugin for replacing links (image & text) in the markdown document.","main":"index.js","scripts":{"test":"npm run lint; npm run unit","unit":"mocha -R spec","lint":"standard"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/markdown-it-replace-link.git"},"keywords":["markdown","markdown-it","markdown-it-plugin"],"author":{"name":"Martin Heidegger"},"license":"MIT","bugs":{"url":"https://github.com/martinheidegger/markdown-it-replace-link/issues"},"homepage":"https://github.com/martinheidegger/markdown-it-replace-link","devDependencies":{"markdown-it":"^13.0.1","markdown-it-testgen":"*","mocha":"^10.2.0","standard":"^17.0.0"},"optionalDependencies":{"dom-serializer":"^2.0.0","htmlparser2":"^8.0.1"},"gitHead":"6b4822999a75fa4eb6cc0773646b0826b9558f44","dependencies":{"dom-serializer":"^2.0.0","htmlparser2":"^8.0.1"},"_id":"markdown-it-replace-link@1.2.0","_nodeVersion":"19.4.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-tIsShJvQOYwTHjIPhE1SWo12HjOtpEqSQfVoApm3fuIkVcZrSE7zK3iW8kXcaJYasf8Ddf+VbH5fNXCzfejOrQ==","shasum":"6ccc088f27062ae06719fc207732206a91e7a2fb","tarball":"http://registry-npm.ywwl.com/markdown-it-replace-link/download/markdown-it-replace-link-1.2.0.tgz","fileCount":9,"unpackedSize":9335,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCS7960XYdwMWXxWNl03PbFonsTU0/TjQXU0l3n74iiowIhAIFgkO6mFuLZoYOuTEybzbwx4OkgoTaQgrIcJ4+Fjd9L"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0Q75ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpWTBAAhjP+WbbY4e48HmgP0PONDfqj0mibvNHHd3DidYP1z9hqk70S\r\n5nb2kJt/kK0wMswWePeTkeX098jYeT8PiM5jDenxhC880aWIViVybVOJAjVP\r\n2w4WqNdQ483klekmiEfcb1CUWSZYALw0RQkwsOsTjBqpan9jnf5Sid8P9SBR\r\nAjJTEGbvXT9sgIwiUtJ2dHvieEC7tH6k9/nL72yWFjMQqlu1QaaPFjyd1hwK\r\nIPfq/Iv7Vd2lxmLWPDDIHb5BRBbUQz3ef3gKw0G+sJCv4wU+//tUftNpwyyI\r\nsGYY9sN5WNAQ51mD4IXjvA/YchBbGgOGJmshzofbx/pPXL4VTCCMNso+K/N2\r\nCcvqvBH/582zV3GK1tPp0NZmUAn+SoNjBoUfaxJf8gkCOE8pgacT3mL351nd\r\nTZhMCL21u6uPI4e7++LJzK4SHjGhysAiD6BDbqYPMl2sgAiHhihf/qmKt1y6\r\n9Jd8F/ghwVm/NtH2A+KPtdXsLNBz7tTGFG0J0Y0kVWXSNtvAUh8u8w++MlCs\r\n216E76kpLumOhBpFMkRw7hw7McVCTBDWnauuSTDT5XwfoOdb1Geci2tFrfMa\r\ns25qCUoXnBfpAv220lz+nXXRHVmvb5C2G+3yW1VtavU8E6VrFUmlVoeN0YQE\r\nRXgnXklCAsUhI7hqkEvmwVJNPfRcTRMZV6A=\r\n=xXeE\r\n-----END PGP SIGNATURE-----\r\n","size":3482,"noattachment":false,"key":"/markdown-it-replace-link/-/markdown-it-replace-link-1.2.0.tgz"},"_npmUser":{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},"directories":{},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-it-replace-link_1.2.0_1674645241386_0.9830344377114457"},"_hasShrinkwrap":false,"publish_time":1674645241546,"_cnpm_publish_time":1674645241546},"1.1.0":{"name":"markdown-it-replace-link","version":"1.1.0","description":"markdown-it plugin for replacing links (image & text) in the markdown document.","main":"index.js","scripts":{"test":"npm run lint; npm run unit","unit":"mocha -R spec","lint":"standard"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/markdown-it-replace-link.git"},"keywords":["markdown","markdown-it","markdown-it-plugin"],"author":{"name":"Martin Heidegger"},"license":"MIT","bugs":{"url":"https://github.com/martinheidegger/markdown-it-replace-link/issues"},"homepage":"https://github.com/martinheidegger/markdown-it-replace-link","devDependencies":{"markdown-it":"*","markdown-it-testgen":"*","mocha":"^7.2.0","standard":"*"},"dependencies":{},"gitHead":"573f678467ff1016d4d6e4622b0a3b40386867cd","_id":"markdown-it-replace-link@1.1.0","_nodeVersion":"12.16.1","_npmVersion":"6.14.5","dist":{"integrity":"sha512-P+4D/Z16utgQVjMumA5W3lMbxWYk4iwg1Fk59wShFm7MRgzbjJm++tvI18LdYwiG8CKNA1TFWvHcbtehvMuViA==","shasum":"cab2343eb27928db1c836e10cd518aaf60a0bd50","tarball":"http://registry-npm.ywwl.com/markdown-it-replace-link/download/markdown-it-replace-link-1.1.0.tgz","fileCount":7,"unpackedSize":5777,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe377KCRA9TVsSAnZWagAAOl4P/1UvtrCAHcjRvn74iyZH\nAdzlKSvZ1NcnhHxGrtjSijxQ3vWL153G9zhbjQDfLnZY1UEX/wyNdkSSHUcX\ndoykkieMyPAxDS88hMhSvzsxBgbvviCtA5wSlKvXA6x/7XqKEGH+tklgQJXm\nvhKpaQIiThZsWTK7LBqXOpdHpT0WMeKLI1YZi8hR7xJvU5HVda3NLOPm+xDX\nCG2eNAbai8AZqAnIl4n3XsgOJEfSw8SMGm3I9eBDEj5TaRmRQMn0QxpFj11R\ngKV5ntr1lQVuus76zO+nZihaumB9F6G+AxTsJlhL1YUJnE6GOjw6QZpMB+XC\nFdgynwxbhR+DQuJARxZ9R5u+R/+VAlfxbf43WUVvPizw6aW+JwzAK1H6aAPu\n93jEJjmTRTFK/A7TG95zKIzuUsgfCnhKohWDis9gA0WlcajFaWPfRpASjKM+\nKk2VCV6VEKSZ9Pv5V7jmcBJRa5fJqEFLF3QBe8XSiE+gjwy4z3E6ygB+MV2h\n7xJ/NOi6+bGKJeqtTY++6Sl44ZLnJpTErEl1w6ezZiqQoOkoukL51NQX9vhh\nNmZJWAj/gyGjIz7c1D/azfznkme92+UtH9g8Hq11GMEs5WE86SqhMDUIL94Y\nHgR+8LTlWx1XkXwKh9YhWz9qeiNjN9XEE9TBMcbL0ReeeS8OOsIfWm9Usy1Q\nRoDQ\r\n=TUJd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoHf+P5m2W8nMag8U3HZEHjz9uZXB5bWqXdUt6WLqKEwIgS0ebS4srZcNaQzt6rZ7WT2Ue3N4EUk+6RO3ZRpRijJs="}],"size":2489,"noattachment":false,"key":"/markdown-it-replace-link/-/markdown-it-replace-link-1.1.0.tgz"},"maintainers":[{"name":"leichtgewicht","email":"mh@leichtgewicht.at"}],"_npmUser":{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-it-replace-link_1.1.0_1591721673596_0.9518651579995341"},"_hasShrinkwrap":false,"publish_time":1591721673741,"_cnpm_publish_time":1591721673741},"1.0.1":{"name":"markdown-it-replace-link","version":"1.0.1","description":"markdown-it plugin for replacing links (image & text) in the markdown document.","main":"index.js","scripts":{"test":"npm run lint; npm run unit","unit":"mocha -R spec","lint":"eslint --reset .","browserify":"(echo \"$HEADER\"; browserify ./ -s markdownitReplaceLink) > dist/markdown-it-replace-link.js","dist":"npm run test-ci; mkdir -p dist; export HEADER=\"/*! $(npm v . name) $(npm v . version) $(npm v . repository.url) @license $(npm v . license) */\"; npm run browserify; npm run uglify","uglify":"uglifyjs dist/markdown-it-replace-link.js -b beautify=false,ascii-only=true -c -m --preamble \"$HEADER\" > dist/markdown-it-replace-link.min.js","coverage":"rm -rf coverage;istanbul cover node_modules/.bin/_mocha","test-ci":"istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/markdown-it-replace-link.git"},"keywords":["markdown","markdown-it","markdown-it-plugin"],"author":{"name":"Martin Heidegger"},"license":"MIT","bugs":{"url":"https://github.com/martinheidegger/markdown-it-replace-link/issues"},"homepage":"https://github.com/martinheidegger/markdown-it-replace-link","devDependencies":{"chai":"^2.3.0","coveralls":"^2.11.2","eslint":"^0.21.0","eslint-plugin-nodeca":"^1.0.3","istanbul":"^0.3.14","markdown-it":"^4.1.0","markdown-it-testgen":"^0.1.4","mocha":"^2.2.4"},"dependencies":{},"gitHead":"66ed4bf393f34354a2009497388bef2fc74af85f","_id":"markdown-it-replace-link@1.0.1","_shasum":"1ecf9da82939ccbbbe010ab1b2a32f1ef28fba42","_from":".","_npmVersion":"4.1.1","_nodeVersion":"7.2.1","_npmUser":{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},"dist":{"shasum":"1ecf9da82939ccbbbe010ab1b2a32f1ef28fba42","tarball":"http://registry-npm.ywwl.com/markdown-it-replace-link/download/markdown-it-replace-link-1.0.1.tgz","integrity":"sha512-FBNtOouEPW878lDp7Oe0npUtsvn/nDv7YMCQ/XZc3yKW3a6aCN+JlRET5P/MY1Fn8lHMlWiQXBbt+62xb4G4gw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLY5vxneNHeApXzLuuw8ZCZYlUS4LsBi8vO11T/1OZ6wIgSWEZqT+MoxWFw7RQD2gY8fYsCspbh/Ma9s447rWZvII="}],"size":3573,"noattachment":false,"key":"/markdown-it-replace-link/-/markdown-it-replace-link-1.0.1.tgz"},"maintainers":[{"name":"leichtgewicht","email":"mh@leichtgewicht.at"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/markdown-it-replace-link-1.0.1.tgz_1487179964692_0.001762343104928732"},"directories":{},"publish_time":1487179966543,"_cnpm_publish_time":1487179966543},"1.0.0":{"name":"markdown-it-replace-link","version":"1.0.0","description":"markdown-it plugin for replacing links (image & text) in the markdown document.","main":"index.js","scripts":{"test":"npm run lint; npm run unit","unit":"mocha -R spec","lint":"eslint --reset .","browserify":"(echo \"$HEADER\"; browserify ./ -s markdownitReplaceLink) > dist/markdown-it-replace-link.js","dist":"npm run test-ci; mkdir -p dist; export HEADER=\"/*! $(npm v . name) $(npm v . version) $(npm v . repository.url) @license $(npm v . license) */\"; npm run browserify; npm run uglify","uglify":"uglifyjs dist/markdown-it-replace-link.js -b beautify=false,ascii-only=true -c -m --preamble \"$HEADER\" > dist/markdown-it-replace-link.min.js","coverage":"rm -rf coverage;istanbul cover node_modules/.bin/_mocha","test-ci":"istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"},"repository":{"type":"git","url":"https://github.com/martinheidegger/markdown-it-replace-link"},"keywords":["markdown","markdown-it","markdown-it-plugin"],"author":{"name":"Martin Heidegger"},"license":"MIT","bugs":{"url":"https://github.com/martinheidegger/markdown-it-replace-link/issues"},"homepage":"https://github.com/martinheidegger/markdown-it-replace-link","devDependencies":{"chai":"^2.3.0","coveralls":"^2.11.2","eslint":"^0.21.0","eslint-plugin-nodeca":"^1.0.3","istanbul":"^0.3.14","markdown-it":"^4.1.0","markdown-it-testgen":"^0.1.4","mocha":"^2.2.4"},"dependencies":{},"_id":"markdown-it-replace-link@1.0.0","_shasum":"f3e98a5752bd5b4c24d92e29f91730191416f00c","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"leichtgewicht","email":"mh@leichtgewicht.at"},"maintainers":[{"name":"leichtgewicht","email":"mh@leichtgewicht.at"}],"dist":{"shasum":"f3e98a5752bd5b4c24d92e29f91730191416f00c","tarball":"http://registry-npm.ywwl.com/markdown-it-replace-link/download/markdown-it-replace-link-1.0.0.tgz","integrity":"sha512-r1eY8sQw+uhY7aX42h5lVVsA/vrZSxtBkkNKHh5pBAOaoiufK2gIltLJxbUK1Zk5O1RyOPhnS2EssSYK/4wCvg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCf2C9fv1j6rJuKPFtSoh8ArzFl2sTvSPw2ZOvS7gxodQIgGu4Ip3Gp9iRbYLTglePC+51OFlOgXZj3Gpn+tPa191A="}],"size":4130,"noattachment":false,"key":"/markdown-it-replace-link/-/markdown-it-replace-link-1.0.0.tgz"},"directories":{},"publish_time":1431536197572,"_cnpm_publish_time":1431536197572}},"readme":"# markdown-it-replace-link\n\n> markdown-it plugin for replacing links (image & text) in the markdown document.\n\n## Usage\n\n#### Enable plugin\n\n```js\nvar md = require('markdown-it')({\n    html: true,\n    linkify: true\n})\n.use(require('markdown-it-replace-link'), {\n    processHTML: true, // defaults to false for backwards compatibility\n    replaceLink: function (link, env, token, htmlToken) {\n        return link + \"?c=\" + Date.now();\n    }\n})\n```\n\n#### Example\n\n```md\n[Hello](test)\n```\n\nand use this\n\n```js\nvar md = require('markdown-it')({\n    replaceLink: function (link, env, token, htmlToken) {\n        return \"http://me.com/\" + link;\n    }\n}).use(require('markdown-it-replace-link'));\n```\n\n\nThis will result in the link prefixed with the `http://me.com/` like:\n\n```html\n<p><a href=\"http://me.com/test\">Hello</a></p>\n```\n\nBoth images and html links will be processed.\n\nIf using this in a browser, the script will create a variable \n`window.markdownitReplaceLink` that can be passed to `.use()`.\n\n### Testing\n\nTo run the tests use:\n```bash\nnpm run test\n```\n\n### License\n\n[MIT](./LICENSE)\n","_attachments":{},"homepage":"https://github.com/martinheidegger/markdown-it-replace-link","bugs":{"url":"https://github.com/martinheidegger/markdown-it-replace-link/issues"},"license":"MIT"}