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