{"_id":"markdown-it-link-attributes","_rev":"9-d526372654acdb8121146c29b26d604c","name":"markdown-it-link-attributes","description":"A markdown-it plugin to configure the attributes for links","dist-tags":{"latest":"4.0.1"},"versions":{"1.0.0":{"name":"markdown-it-link-attributes","version":"1.0.0","description":"A markdown-it plugin to configure the attributes for links","main":"index.js","scripts":{"build":"node tasks/build.js && npm run minify","minify":"uglifyjs dist/markdown-it-link-attributes.js > dist/markdown-it-link-attributes.min.js","lint":"standard | snazzy","test":"npm run lint && mocha"},"repository":{"type":"git","url":"git+https://github.com/crookedneighbor/markdown-it-link-attributes.git"},"keywords":["markdown","markdown-it","markdown-it-plugin"],"author":{"name":"Blade Barringer","email":"blade@crookedneighbor.com"},"license":"MIT","bugs":{"url":"https://github.com/crookedneighbor/markdown-it-link-attributes"},"homepage":"https://github.com/crookedneighbor/markdown-it-link-attributes","devDependencies":{"browserify":"^13.0.0","chai":"^3.5.0","chalk":"^1.1.3","markdown-it":"^6.0.1","mocha":"^2.4.5","rimraf":"^2.5.2","sinon":"^1.17.3","sinon-chai":"^2.8.0","snazzy":"^3.0.1","standard":"^6.0.8","uglify-js":"^2.6.2"},"standard":{"globals":["after","afterEach","before","beforeEach","context","describe","expect","it","sandbox","xdescribe","xcontext","xit"],"ignore":["dist/"]},"gitHead":"7e83ccab4fa8e45aa4e31ae3b99a63a128af7953","_id":"markdown-it-link-attributes@1.0.0","_shasum":"8da1ca1729f0fa16c65615b0b1075b79c8371a2e","_from":".","_npmVersion":"3.9.2","_nodeVersion":"4.3.1","_npmUser":{"name":"bladebarringer","email":"blade@crookedneighbor.com"},"dist":{"shasum":"8da1ca1729f0fa16c65615b0b1075b79c8371a2e","tarball":"https://registry.npmjs.org/markdown-it-link-attributes/-/markdown-it-link-attributes-1.0.0.tgz","integrity":"sha512-gszv3X9ksOFPyjIScNA8VemYPLdu+n9dxM6O/Bn9YaanYo0xMAQRkmkE6tLSlo/ateA6iemvR3O1L0y+gFVslg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJqkblKxqRC7hhy5Rpw3xbyoYRX3rnc0rwExA3SHzAAAIgEYNbJXFgKR9dWscEFyyH0ZgWvkxKpwwz8L2gGLK1OFE="}]},"maintainers":[{"name":"bladebarringer","email":"blade@crookedneighbor.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/markdown-it-link-attributes-1.0.0.tgz_1472214659453_0.9959951641503721"},"directories":{}},"2.0.0":{"name":"markdown-it-link-attributes","version":"2.0.0","description":"A markdown-it plugin to configure the attributes for links","main":"index.js","scripts":{"build":"node tasks/build.js && npm run minify","minify":"uglifyjs dist/markdown-it-link-attributes.js > dist/markdown-it-link-attributes.min.js","lint":"standard | snazzy","pretest":"npm run lint && npm run build","test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/crookedneighbor/markdown-it-link-attributes.git"},"keywords":["markdown","markdown-it","markdown-it-plugin"],"author":{"name":"Blade Barringer","email":"blade@crookedneighbor.com"},"license":"MIT","bugs":{"url":"https://github.com/crookedneighbor/markdown-it-link-attributes"},"homepage":"https://github.com/crookedneighbor/markdown-it-link-attributes","devDependencies":{"browserify":"^14.4.0","chai":"^4.1.2","chalk":"^2.1.0","check-ecmascript-version-compatibility":"^0.1.1","mocha":"^3.0.2","rimraf":"^2.5.2","sinon":"^3.2.1","sinon-chai":"^2.8.0","snazzy":"^7.0.0","standard":"^10.0.3","uglify-js":"^3.1.0"},"standard":{"globals":["after","afterEach","before","beforeEach","context","describe","expect","it","sandbox","xdescribe","xcontext","xit"],"ignore":["dist/"]},"gitHead":"9891626a0563d5b5a03758ccb2d162da80e4aa5a","_id":"markdown-it-link-attributes@2.0.0","_npmVersion":"5.3.0","_nodeVersion":"8.0.0","_npmUser":{"name":"bladebarringer","email":"blade@crookedneighbor.com"},"dist":{"integrity":"sha512-z/LGxmxD5tnmEUnOWB8T2Nno7QWIi9NbmRgGXI0TwbymMDo4ifWmQ8bDC8XWnqR+24JzUjW6v+D6Oii5gSw6eg==","shasum":"24803e7a2331c54cbd1450b8b03dc7f5f89a3c27","tarball":"https://registry.npmjs.org/markdown-it-link-attributes/-/markdown-it-link-attributes-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcXXRceO26AdxNFFV+siTWs0dFfnJzNI50q0pRN+vwOwIgZBXfyJTFK18E0aBSF1rpIggG2UOfgZsPNxmvXn5KElI="}]},"maintainers":[{"name":"bladebarringer","email":"blade@crookedneighbor.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-it-link-attributes-2.0.0.tgz_1505964567661_0.7732881631236523"},"directories":{}},"2.1.0":{"name":"markdown-it-link-attributes","version":"2.1.0","description":"A markdown-it plugin to configure the attributes for links","main":"index.js","scripts":{"build":"node tasks/build.js && npm run minify","minify":"uglifyjs dist/markdown-it-link-attributes.js > dist/markdown-it-link-attributes.min.js","lint":"standard | snazzy","pretest":"npm run lint && npm run build","test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/crookedneighbor/markdown-it-link-attributes.git"},"keywords":["markdown","markdown-it","markdown-it-plugin"],"author":{"name":"Blade Barringer","email":"blade@crookedneighbor.com"},"license":"MIT","bugs":{"url":"https://github.com/crookedneighbor/markdown-it-link-attributes"},"homepage":"https://github.com/crookedneighbor/markdown-it-link-attributes","devDependencies":{"browserify":"^14.4.0","chai":"^4.1.2","chalk":"^2.1.0","check-ecmascript-version-compatibility":"^0.1.1","mocha":"^3.0.2","rimraf":"^2.5.2","sinon":"^3.2.1","sinon-chai":"^2.8.0","snazzy":"^7.0.0","standard":"^10.0.3","uglify-js":"^3.1.0"},"standard":{"globals":["after","afterEach","before","beforeEach","context","describe","expect","it","sandbox","xdescribe","xcontext","xit"],"ignore":["dist/"]},"gitHead":"ccb21ca5b81ed8328fc6ff5070cac62d0397694d","_id":"markdown-it-link-attributes@2.1.0","_shasum":"32a74c94f7c5cdfd08868d2bee29c6fa70a08324","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"bladebarringer","email":"blade@crookedneighbor.com"},"dist":{"shasum":"32a74c94f7c5cdfd08868d2bee29c6fa70a08324","tarball":"https://registry.npmjs.org/markdown-it-link-attributes/-/markdown-it-link-attributes-2.1.0.tgz","fileCount":6,"unpackedSize":8496,"integrity":"sha512-NclmOF52k57idAZI93PREbPKbKPFyafwoJncWW9dKpkYGbO26oJGHa4bUoU27Lk8TeWLbPEzuKFyQGwuB2NbdA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEbOeriocpJ6RF2W2b/ZYpg0T/VAnX1fjdYrRgA3JdxsAiEApDBjH2VoxZbmAoDqKrhrAFCkF4G7uYxb3vwZWHbhP0I="}]},"maintainers":[{"name":"bladebarringer","email":"blade@crookedneighbor.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-it-link-attributes_2.1.0_1522761838894_0.04596006653121831"},"_hasShrinkwrap":false},"3.0.0":{"name":"markdown-it-link-attributes","version":"3.0.0","description":"A markdown-it plugin to configure the attributes for links","main":"index.js","scripts":{"build":"node tasks/build.js && npm run minify","minify":"uglifyjs dist/markdown-it-link-attributes.js > dist/markdown-it-link-attributes.min.js","lint":"standard | snazzy","pretest":"npm run lint && npm run build","test":"mocha","prepublishOnly":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/crookedneighbor/markdown-it-link-attributes.git"},"keywords":["markdown","markdown-it","markdown-it-plugin"],"author":{"name":"Blade Barringer","email":"blade@crookedneighbor.com"},"license":"MIT","bugs":{"url":"https://github.com/crookedneighbor/markdown-it-link-attributes"},"homepage":"https://github.com/crookedneighbor/markdown-it-link-attributes","devDependencies":{"browserify":"^16.5.0","chai":"^4.1.2","chalk":"^2.1.0","check-ecmascript-version-compatibility":"^0.1.1","mocha":"^6.2.1","rimraf":"^3.0.0","sinon":"^7.5.0","sinon-chai":"^3.3.0","snazzy":"^8.0.0","standard":"^14.3.1","uglify-js":"^3.1.0"},"standard":{"globals":["after","afterEach","before","beforeEach","context","describe","expect","it","sandbox","xdescribe","xcontext","xit"],"ignore":["dist/"]},"gitHead":"bdaf84e88c24f423de040f85fa2a6f9d86c97bea","_id":"markdown-it-link-attributes@3.0.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-B34ySxVeo6MuEGSPCWyIYryuXINOvngNZL87Mp7YYfKIf6DcD837+lXA8mo6EBbauKsnGz22ZH0zsbOiQRWTNg==","shasum":"12d6f403102ac22695ee2617bec109ee79426e45","tarball":"https://registry.npmjs.org/markdown-it-link-attributes/-/markdown-it-link-attributes-3.0.0.tgz","fileCount":7,"unpackedSize":13564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdm0zaCRA9TVsSAnZWagAASTQP/3SzXCOkV5SV5D5fqp0p\n5lVrMmD3pm8VZXLm9eqoVf96Im95CSrcm7zLNsYwpAJJ+4Vxeza6I3iiaN0M\nVAJiBNHVwpHRYScB0Em0csuIHVMvzmdS4MMfnBr16bJGflSKPvn+QdW3+ZDd\nQ+sRNwUPAVrFev7ceRXx5XSP4/4ZpOVDIatHEEJZQ0qbJmsZWokUIwCSeAmg\nVovuunRokddB/kr4JWZoQkJw5b+7qoK7v8qWRytdqEhXxPLf0l6A9qW3rxlq\nNtNEvUqoz5IjcvblvGNpzemV3ojvcm5phn+00PrBFgygf9XtvxNO/sCzwmf4\nqUzrzUrOE3dxUaI7s8s3ZLy0EwiEWzNzL93RZipFmJPa2ZMnLaMLm0uKuXFR\nA3n9mekH9I8ZRdKP4OylHMywANDInXPjxZFk0CEicx8p0d3G5MiB0rybmXFr\nRRtxMOVZeqEc75T9byhEsPD1xGVDr36uW2wpvSFwI3FfNxMlUaBwXOIWF+wb\nv7e9oc9yldMbTkvzxReqrbIvjqmigHkJHbyABDD3hreum+6Hv9ydh5no+3K1\ng5jcshn3Ml8qGv8Ot+yfJc+m1YN/P8X0n3HMgTGkPvVoiJNNTw1OnlPEDb1y\nrP4XbrsPCZJ4FTj+LJHJal24MHXqQ1JIEviAiMzjtSbm2iM+Ay234/RIxZTN\nCJEr\r\n=OdzV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDP2n3rCsdsQP0x1D0v5FKx19DGYFGGnPXrIY7DUIwgggIgdOldFxiKRak0/O6CpZty9LUl7Z23FH3DvVspOaQGRG4="}]},"maintainers":[{"name":"bladebarringer","email":"blade@crookedneighbor.com"}],"_npmUser":{"name":"bladebarringer","email":"blade@crookedneighbor.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-it-link-attributes_3.0.0_1570458841834_0.41507525127889466"},"_hasShrinkwrap":false},"4.0.0":{"name":"markdown-it-link-attributes","version":"4.0.0","description":"A markdown-it plugin to configure the attributes for links","main":"index.js","scripts":{"prebuild":"prettier --write .","build":"node tasks/build.js && npm run minify","minify":"uglifyjs dist/markdown-it-link-attributes.js > dist/markdown-it-link-attributes.min.js","lint":"eslint","pretest":"npm run lint && npm run build","test":"jest","prepublishOnly":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/crookedneighbor/markdown-it-link-attributes.git"},"keywords":["markdown","markdown-it","markdown-it-plugin"],"author":{"name":"Blade Barringer","email":"blade@crookedneighbor.com"},"license":"MIT","bugs":{"url":"https://github.com/crookedneighbor/markdown-it-link-attributes"},"homepage":"https://github.com/crookedneighbor/markdown-it-link-attributes","devDependencies":{"browserify":"^17.0.0","chalk":"^4.1.0","check-ecmascript-version-compatibility":"^0.1.1","eslint":"^8.5.0","eslint-config-prettier":"^8.3.0","jest":"^27.4.5","markdown-it":"latest","prettier":"^2.5.1","rimraf":"^3.0.2","uglify-js":"^3.14.5"},"eslint":{"ignore":["dist/"]},"gitHead":"6853e62fc6cc5b06d08f6f2eb6690e5cec439c14","_id":"markdown-it-link-attributes@4.0.0","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-ssjxSLlLfQBkX6BvAx1rCPrx7ZoK91llQQvS3P7KXvlbnVD34OUkfXwWecN7su/7mrI/HOW0RI5szdJOIqYC3w==","shasum":"188fdba1cae0d11dc80cc841ae9a7919ad8a9be3","tarball":"https://registry.npmjs.org/markdown-it-link-attributes/-/markdown-it-link-attributes-4.0.0.tgz","fileCount":11,"unpackedSize":14360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhxOCQCRA9TVsSAnZWagAAtJ4P+wYt70ofMjHyBwna2/LE\nHrPHaLNBlhAoNyKjH1yKWyRNQDpgQWIUCJHpGLeXvg0IeXDFTbQ+cGmijEt/\nLsU0yd9aJfLKe5mBa8ixcoBwViViDLUnAdNR+Kg8eFHMNpcXcWlx2gz7K8EU\nd0Sv+mASEcL6FOAuf5PFJ+boXGtgL5kY5XNd11PmUEk+zU4yCXS8EMY2tz31\nkdtMOltcPJIAyBA+VFXSkzzevI7siGvkRDz4U6sSpZMbkKwn04MsR8n0qkMX\nPU+D6ips8ISttMwNJCdscWsDRK3a5hR/5x2IiAarTvG6bfBOxZR6KqTMwAac\nh/rpcgZtbhjA53a5+mSLWTxk8I1GKN5HL8M433e1Cv1E14uvSXqD+jTEB2F+\nO6gUlH62FoBNJV73pBX7/wZjWwNjXaqCTHoGWmJXjFPJmcc7hCKuAcfyWCYl\nvA0LQiGxsRwk7A73jF9lL+wESOQfwmnU0Sm8aa9FVcmU39hmQXrxP3YUrlDW\nWFAttTJEHpqUb561DuJ4NIsSIOmjoLVwhDmuQexTbFao8G5GUug4KnZYBmvj\nLd3dgCgxHB3MRw6LXnzXOJNE/ZhQMEVOmISgzbzdKIwEou0cEGaOx3R4ZizI\nOnDyQQKm6F28wo2tDHi3DxZB7XaN/2rc3J1x+WVeozucr9GUM5yKeAt+1ywl\nmm3j\r\n=S9Pr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHN+ZYGywVHMLHcwKcNnuSLfymXhDDJ+9/2IVhb7IpKvAiEA1Y5/SlzKG+dtWfReSOEVhJnEOsELY27EyVXxpZaCDaw="}]},"_npmUser":{"name":"bladebarringer","email":"blade@crookedneighbor.com"},"directories":{},"maintainers":[{"name":"bladebarringer","email":"blade@crookedneighbor.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-it-link-attributes_4.0.0_1640292495839_0.6034531446929015"},"_hasShrinkwrap":false},"4.0.1":{"name":"markdown-it-link-attributes","version":"4.0.1","description":"A markdown-it plugin to configure the attributes for links","main":"index.js","scripts":{"prebuild":"prettier --write .","build":"node tasks/build.js && npm run minify","minify":"uglifyjs dist/markdown-it-link-attributes.js > dist/markdown-it-link-attributes.min.js","lint":"eslint","pretest":"npm run lint && npm run build","test":"jest","prepublishOnly":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/crookedneighbor/markdown-it-link-attributes.git"},"keywords":["markdown","markdown-it","markdown-it-plugin"],"author":{"name":"Blade Barringer","email":"blade@crookedneighbor.com"},"license":"MIT","bugs":{"url":"https://github.com/crookedneighbor/markdown-it-link-attributes"},"homepage":"https://github.com/crookedneighbor/markdown-it-link-attributes","devDependencies":{"browserify":"^17.0.0","check-ecmascript-version-compatibility":"^0.1.1","eslint":"^8.21.0","eslint-config-prettier":"^8.5.0","jest":"^28.1.3","markdown-it":"latest","prettier":"^2.7.1","rimraf":"^3.0.2","uglify-js":"^3.16.3"},"eslint":{"ignore":["dist/"]},"gitHead":"e87488781a483ac1ae4efc58dfcef3432f208a01","_id":"markdown-it-link-attributes@4.0.1","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-pg5OK0jPLg62H4k7M9mRJLT61gUp9nvG0XveKYHMOOluASo9OEF13WlXrpAp2aj35LbedAy3QOCgQCw0tkLKAQ==","shasum":"25751f2cf74fd91f0a35ba7b3247fa45f2056d88","tarball":"https://registry.npmjs.org/markdown-it-link-attributes/-/markdown-it-link-attributes-4.0.1.tgz","fileCount":11,"unpackedSize":14541,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDkPNp/uiHTgHrvpR4LXMC8z8rFvuCFlBfOhs3fEneIIAiEAoBb/9mt7VczIhHsuNcSaqnblomEyjxkvXRJF8c1NVE0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9ssZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpkhQ//Yi0K+3XtOBbaqKlXltIYHouwUghZqiJaC6DXCYXqvRe88SlQ\r\nntVv+n9OPQFqMjcTAC9Wu2B1ZZyKCgFSIZQvVFB8alkziHKwUHMJZe+sgu2F\r\n3R+49fieS/cnrLArkQ9eIHx91iCQfCkFINgCAvd+WZm2Q/Y6fpyBNIIBh2JF\r\nZ1SJVJ3KXtigB380K9q4OqXtbDi9mAN2OnLm+xNOcfGqJRon9pc9OMe0QnmP\r\nMV15YBtsk4iSVm8Smxo/8QVc/1aqfKh+4w1J0j6/2JI9hzPCNZWL/R6jugUm\r\nnB2n6Rka9Q+AnPUufYsUWN7Q7mwabyNIasJrXCFAqkDFm+seWUuxS0+76BIt\r\nS+zbOLabd2/jPrsPBEXo124b9dQv8+ZtNbE00osIMKrGAFd0P7yf2UmtFyD1\r\nDOpQ8qORq4Aa2qAafzoew+C3oQqRAR9USEA1rP6/c3WejoEaA29Z65kulWMf\r\nyVs+jOuqEotf9C3SmYvSfau3aPUOR6kk+BkxXrWkis2D/IKPiCInUOKCf8M4\r\n0qHsW1KUijYPtMHLgfCvproJ4zaz93QPuXHiqs3OryVbgZdwakbiNK7cN6Pk\r\nNFZy17gRceuhw1N9RMthnBlu/uvceZk0nKFJ+HJFEd2gxHZ4Vj+9jB+Yz4/F\r\nM++ead95RLH27+pjwgsS8HZzGq6RWhsZ0No=\r\n=U4gj\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bladebarringer","email":"blade@crookedneighbor.com"},"directories":{},"maintainers":[{"name":"bladebarringer","email":"blade@crookedneighbor.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-it-link-attributes_4.0.1_1660341017780_0.8115010600386046"},"_hasShrinkwrap":false}},"readme":"# markdown-it-link-attributes\n\n> Link attributes plugin for [markdown-it](https://github.com/markdown-it/markdown-it) markdown parser.\n\n## Install\n\nnode.js, browser:\n\n```bash\nnpm install markdown-it-link-attributes --save\nbower install markdown-it-link-attributes --save\n```\n\n## Use\n\n### Basic Configuration\n\nYou can pass an object with an attrs property. Each link parsed with this config will have the passed attributes.\n\n```js\nvar md = require(\"markdown-it\")();\nvar mila = require(\"markdown-it-link-attributes\");\n\nmd.use(mila, {\n  attrs: {\n    target: \"_blank\",\n    rel: \"noopener\",\n  },\n});\n\nvar result = md.render(\"[Example](https://example.com\");\n\nresult; // <a href=\"https://example.com\" target=\"_blank\" rel=\"noopener\">Example</a>\n```\n\nIf the `linkify` option is set to `true` on `markdown-it`, then the attributes will be applied to plain links as well.\n\n```js\nvar md = require(\"markdown-it\")({\n  linkify: true,\n});\n\nmd.use(mila, {\n  target: \"_blank\",\n  rel: \"noopener\",\n});\n\nvar html = md.render(\"foo https://google.com bar\");\nhtml; // <p>foo <a href=\"https://google.com\" target=\"_blank\" rel=\"noopener\">https://google.com</a> bar</p>\n```\n\n### Applying classes\n\nYou can apply a `class` to a link by using a `class` or a `className` property. Either one will work, but use only one, not both.\n\n```js\nmd.use(mila, {\n  attrs: {\n    class: \"my-class\",\n  },\n});\n\n// or\nmd.use(mila, {\n  attrs: {\n    className: \"my-class\",\n  },\n});\n```\n\n### Conditionally apply attributes\n\nYou can choose to test a link's `href` against a matcher function. The attributes will be applied only if the matcher function returns true.\n\n```js\nmd.use(mila, {\n  matcher(href, config) {\n    return href.startsWith(\"https:\");\n  },\n  attrs: {\n    target: \"_blank\",\n    rel: \"noopener\",\n  },\n});\n\nvar matchingResult = md.render(\"[Matching Example](https://example.com\");\nvar ignoredResult = md.render(\"[Not Matching Example](http://example.com\");\n\nmatchingResult; // <a href=\"https://example.com\" target=\"_blank\" rel=\"noopener\">Matching Example</a>\nignoredResult; // <a href=\"http://example.com\">Not Matching Example</a>\n```\n\n### Multiple Configurations\n\nAlternatively, you can pass an Array of configurations. The first matcher function to return true will be applied to the link.\n\n```js\nmd.use(mila, [\n  {\n    matcher(href) {\n      return href.match(/^https?:\\/\\//);\n    },\n    attrs: {\n      class: \"external-link\",\n    },\n  },\n  {\n    matcher(href) {\n      return href.startsWith(\"/\");\n    },\n    attrs: {\n      class: \"absolute-link\",\n    },\n  },\n  {\n    matcher(href) {\n      return href.startsWith(\"/blue/\");\n    },\n    attrs: {\n      class: \"link-that-contains-the-word-blue\",\n    },\n  },\n]);\n\nvar externalResult = md.render(\"[external](https://example.com\");\nvar absoluteResult = md.render(\"[absolute](/some-page\");\nvar blueResult = md.render(\"[blue](relative/link/with/blue/in/the/name\");\n\nexternalResult; // <a href=\"https://example.com\" class=\"external-link\">external</a>\nabsoluteResult; // <a href=\"/some-page\" class=\"absolute-link\">absolute</a>\nblueResult; // <a href=\"relative/link/with/blue/in/the/name\" class=\"link-that-contains-the-word-blue\">blue</a>\n```\n\nIf multiple matcher functions return true, the first configuration to match will be used.\n\n```js\n// This matches both the \"starts with http or https\" rule and the \"contains the word blue\" rule.\n// Since the http/https rule was defined first, that is the configuration that is used.\nvar result = md.render(\"[external](https://example.com/blue\");\n\nresult; // <a href=\"https://example.com/blue\" class=\"external-link\">external</a>\n```\n\n## Usage in the browser\n\n_Differences in browser._ If you load script directly into the page, without a package system, the module will add itself globally as `window.markdownitLinkAttributes`.\nYou need to load `dist/markdown-it-link-attributes.min.js`, if you don't use a build system.\n\n## Testing\n\nThis plugin is tested against the latest version of markdown-it\n\n## License\n\n[MIT](https://github.com/markdown-it/markdown-it-footnote/blob/master/LICENSE)\n","maintainers":[{"name":"bladebarringer","email":"blade@crookedneighbor.com"}],"time":{"modified":"2022-08-12T21:50:18.010Z","created":"2016-08-26T12:31:00.286Z","1.0.0":"2016-08-26T12:31:00.286Z","2.0.0":"2017-09-21T03:29:28.666Z","2.1.0":"2018-04-03T13:23:58.987Z","3.0.0":"2019-10-07T14:34:01.980Z","4.0.0":"2021-12-23T20:48:16.107Z","4.0.1":"2022-08-12T21:50:17.942Z"},"homepage":"https://github.com/crookedneighbor/markdown-it-link-attributes","keywords":["markdown","markdown-it","markdown-it-plugin"],"repository":{"type":"git","url":"git+https://github.com/crookedneighbor/markdown-it-link-attributes.git"},"author":{"name":"Blade Barringer","email":"blade@crookedneighbor.com"},"bugs":{"url":"https://github.com/crookedneighbor/markdown-it-link-attributes"},"license":"MIT","readmeFilename":"README.md"}