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