{"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,"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","publish_time":1674645241546,"_cnpm_publish_time":1674645241546,"dist-tags":{"latest":"1.2.2"}}