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