{"_id":"@amanda-mitchell/remark-renumber-footnotes","_rev":"3-97b1454cd0b5aa85ae986d99db8c0fef","name":"@amanda-mitchell/remark-renumber-footnotes","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.0":{"name":"@amanda-mitchell/remark-renumber-footnotes","version":"1.0.0","description":"A remark-parse plugin that renumbers footnotes sequentially.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/amanda-mitchell/remark-renumber-footnotes.git"},"author":{"name":"Amanda Mitchell","email":"she@mandymitchell.me"},"license":"MIT","private":false,"publishConfig":{"access":"public"},"keywords":["unified","remark","remark-plugin","plugin","mdast","markdown"],"devDependencies":{"@amanda-mitchell/node-project-scripts":"^2.23.0","jest":"^26.6.3","remark-footnotes":"^3.0.0","remark-html":"^13.0.1","remark-parse":"^9.0.0","unified":"^9.2.0","unist-builder":"^2.0.3"},"dependencies":{"unist-util-is":"^4.0.4"},"gitHead":"d2c3d3d061a5aa16944cd181c7d6fa15623d6212","bugs":{"url":"https://github.com/amanda-mitchell/remark-renumber-footnotes/issues"},"homepage":"https://github.com/amanda-mitchell/remark-renumber-footnotes#readme","_id":"@amanda-mitchell/remark-renumber-footnotes@1.0.0","_nodeVersion":"12.20.0","_npmVersion":"6.14.9","dist":{"integrity":"sha512-s9bCjoeCtQHcNYy0L5v+TYlMlDkQldSSE5uJzkI55PRAqMJyrdzRkWl9V0tpDw3oDoQsSK8+doXHMtOycxUx7Q==","shasum":"1c71cd7768126e29b5fa6347220f599f3f2f27aa","tarball":"https://registry.npmjs.org/@amanda-mitchell/remark-renumber-footnotes/-/remark-renumber-footnotes-1.0.0.tgz","fileCount":13,"unpackedSize":17476,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1oQuCRA9TVsSAnZWagAAReoP/1IxAqi1r/K005X3i5t3\nUV7EABJWon87U2jB0CQ+xw/kQznK3OgER5CXUyaqTWgVocNQBi4KYxITCtlU\nxILbOPorS3TyY+YS35mgqV+UZ7flQs91rLmAX0pnghg9HPOB/d3fKU0PhU6a\nzK3Op2/ai5Q5pkYm6aWrYp7VKEnfbQSvK5yCs81cGjhn2BMLrOJ57rp75XtQ\nbqQqagNGF3B3TNjTFfLGQ4+C4yKBmB4Twu+HJBgQHWW4N9/j+cL6S3h9y7wv\n6nstL4uCudf5dkZjxE3BPcf4N0ST39Ynv6A392pkjFt3cEaPG6teURE/0Jp0\n/qBUMwZvd6qXSq3cExGrvbiewtnWSIMo/gpZ4hwbVRRQiyZRZ6tMASli2wCO\nkGkPRBKLzlvgSKFRRVHvgBRFSkCOSXJGXDQM9gbZaBufrOac7YIxqJkyTywm\njLeRgSGeMwGtR3ItlocgzE3Ttxsf+oklK1YIC3sRF9xvwFtoOQQMzOd/4UL3\nUmMAgU5h/JDehwFY5iNDYoFZz6DKvN4dKg/9t5C9xL71qmRaIFoCciK2yFpD\nmUkODiwjRkjHAvGqHEeFbJbkTKzJeAsS1l6l1OWU9We5jJUT9tIQWYiFFMYL\nNZcWYM4egC3m1V/qAJYwjSC/I+IEi3YyN0tS3XtS9c9Z8faLbHEE3lygko3W\nGlLe\r\n=si1t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDdSvzFa+PL694k6cEG/sus2NK5XUK5JtU4uQim+JHJbAIhAPmewYOJ3uWtoOpv/zuhdooPYmagZzroxjnvy/6twLeY"}]},"_npmUser":{"name":"amanda-mitchell","email":"she@mandymitchell.me"},"directories":{},"maintainers":[{"name":"amanda-mitchell","email":"she@mandymitchell.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remark-renumber-footnotes_1.0.0_1607894062037_0.5590722567105115"},"_hasShrinkwrap":false},"2.0.0":{"name":"@amanda-mitchell/remark-renumber-footnotes","version":"2.0.0","description":"A remark-parse plugin that renumbers footnotes sequentially.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/amanda-mitchell/remark-renumber-footnotes.git"},"author":{"name":"Amanda Mitchell","email":"she@mandymitchell.me"},"license":"MIT","private":false,"publishConfig":{"access":"public"},"keywords":["unified","remark","remark-plugin","plugin","mdast","markdown"],"type":"module","devDependencies":{"@amanda-mitchell/node-project-scripts":"^3.4.0","jest":"^27.0.6","remark-footnotes":"^3.0.0","remark-html":"^13.0.1","remark-parse":"^9.0.0","unified":"^9.2.0","unist-builder":"^2.0.3"},"dependencies":{"unist-util-is":"^4.0.4"},"gitHead":"0aa2f633b56a682c3557d647b621855265173f3b","bugs":{"url":"https://github.com/amanda-mitchell/remark-renumber-footnotes/issues"},"homepage":"https://github.com/amanda-mitchell/remark-renumber-footnotes#readme","_id":"@amanda-mitchell/remark-renumber-footnotes@2.0.0","_nodeVersion":"16.14.0","_npmVersion":"8.5.1","dist":{"integrity":"sha512-UrFCOLUaa7GAQvM0/Dq+4BJ56iu7Ju5fUl6L8yJF7QMcpfXiUkwBWfyA68gxsNJCBoZyExKoLdgRhwQyCw6ZEQ==","shasum":"3ec657a748cb1d96994d3aedb596c160efddbf9f","tarball":"https://registry.npmjs.org/@amanda-mitchell/remark-renumber-footnotes/-/remark-renumber-footnotes-2.0.0.tgz","fileCount":16,"unpackedSize":18804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiG779ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoH8g//WjLNwS1nDEm+AvHouY678/TJLUF84DGyB8rp+Bi2eSkc16Nn\r\n5rMwEaOhnEJiHeo/72fjEntRs6w65B6Tbdil6eiGQA7e8fJg93Tcxac9o+B2\r\n7EX6WFJ2+5ZDgU6BPoUocoU2ZkhUG+LATBbIl/Rf2qc/SAMx1eu/DKupSeDj\r\nM7SKes72GraK6uF5FnHo3hNzvHY5KNhMzBIoWA9eD0fXO6xKM7ctfJe+jWpj\r\nPoHBNsbu+KLAYA7WV02FJ+3bB70j+t+z64om8Po7Hy1j4i3aNuWucsth/W0G\r\nmcz3Z7fQGWCGD4HfKFLOc6uj7hWElaMAevBeHqB047ybe66L1nKBy5a4KeJA\r\nBDDrlkbMUd3kSwBYbn2UcmKXHYnhRMIHTQ+O+2sESmHKkJ/hk05LIXiAaXpG\r\n3HURmJEn/2YcU6Lvvb5ot8nEodCorjBE+y6vJgIg1dwHA+GUQR+AdOeMNBlc\r\no3NIHybGzw70gK+pPddOg7LdwU038u31HlkbfJ5vI05OTDsKyDA7xfKxzDg2\r\nNVBzdpdI3jpJedMSz3YxzzFLXvy3SuNdIxhEdX1AL72r4JqfXIdsfBqKIHbp\r\nIBLtG5Ox7x6F0zip0slot5oYpPD33oi1heQ5mAcZVju+gBmb6JVQQIZLw67m\r\nSspbLgbqxlhIu6ESeKj4u3J49r0M28jwh7s=\r\n=lcxO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDODWPDv83lWhY05bWWqJ6xJHJRDvgdaU1aywnwTIyVxwIgJn/U+zGxh9ycYnLlmmdP5dhpTbbbIqArpxnowltqP/o="}]},"_npmUser":{"name":"amanda-mitchell","email":"she@mandymitchell.me"},"directories":{},"maintainers":[{"name":"amanda-mitchell","email":"she@mandymitchell.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remark-renumber-footnotes_2.0.0_1645985533603_0.9610142535941748"},"_hasShrinkwrap":false},"3.0.0":{"name":"@amanda-mitchell/remark-renumber-footnotes","version":"3.0.0","description":"A remark-parse plugin that renumbers footnotes sequentially.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/amanda-mitchell/remark-renumber-footnotes.git"},"author":{"name":"Amanda Mitchell","email":"she@mandymitchell.me"},"license":"MIT","private":false,"publishConfig":{"access":"public"},"keywords":["unified","remark","remark-plugin","plugin","mdast","markdown"],"type":"module","types":"dist/index.d.ts","devDependencies":{"@amanda-mitchell/node-project-scripts":"4.72.1","@types/unist":"^3.0.2","jest":"^29.0.0","mdast":"^3.0.0","remark-html":"^16.0.1","remark-parse":"^11.0.0","unified":"^11.0.2","unist-builder":"^4.0.0"},"dependencies":{"remark-gfm":"^4.0.0","unist-util-is":"^6.0.0"},"gitHead":"48a77f9c485368376aed9073611c32eaa8b35dec","bugs":{"url":"https://github.com/amanda-mitchell/remark-renumber-footnotes/issues"},"homepage":"https://github.com/amanda-mitchell/remark-renumber-footnotes#readme","_id":"@amanda-mitchell/remark-renumber-footnotes@3.0.0","_nodeVersion":"18.19.1","_npmVersion":"8.19.4","dist":{"integrity":"sha512-LNUJNJDmut6pr/1BQJvWzY/E9nMl7/+I3f6f44p9l1PfCai+vcNUwSbztEOg28xSzm6eIZ/kusLQ58zBQRFDcw==","shasum":"e2fff0c79fcd19e0003ebbe717caa23e9aefdc08","tarball":"https://registry.npmjs.org/@amanda-mitchell/remark-renumber-footnotes/-/remark-renumber-footnotes-3.0.0.tgz","fileCount":12,"unpackedSize":39606,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICICEQHBfrGnFWYGRQX//3mVP60z/krd+vvecyari9LlAiEAgpnfO8xSREaEyfimbTRXWb4TIfIVmFagjtPMxblDA5s="}]},"_npmUser":{"name":"amanda-mitchell","email":"she@mandymitchell.me"},"directories":{},"maintainers":[{"name":"amanda-mitchell","email":"she@mandymitchell.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remark-renumber-footnotes_3.0.0_1710477203059_0.0448287659882578"},"_hasShrinkwrap":false}},"time":{"created":"2020-12-13T21:14:22.001Z","1.0.0":"2020-12-13T21:14:22.162Z","modified":"2024-03-15T04:33:23.686Z","2.0.0":"2022-02-27T18:12:13.758Z","3.0.0":"2024-03-15T04:33:23.231Z"},"maintainers":[{"name":"amanda-mitchell","email":"she@mandymitchell.me"}],"description":"A remark-parse plugin that renumbers footnotes sequentially.","homepage":"https://github.com/amanda-mitchell/remark-renumber-footnotes#readme","keywords":["unified","remark","remark-plugin","plugin","mdast","markdown"],"repository":{"type":"git","url":"git+https://github.com/amanda-mitchell/remark-renumber-footnotes.git"},"author":{"name":"Amanda Mitchell","email":"she@mandymitchell.me"},"bugs":{"url":"https://github.com/amanda-mitchell/remark-renumber-footnotes/issues"},"license":"MIT","readme":"# @amanda-mitchell/remark-renumber-footnotes\n\nThis is a remark-parse plugin that renumbers footnotes so that they're always sequential in order of when the reference first appears in the document.\n\n## Installation\n\n```\nyarn add @amanda-mitchell/remark-renumber-footnotes\n```\n\n## Use\n\nConstruct a unified parser and pass `renumberFootnotes` to it as a plugin:\n\n```js\nconst unified = require('unified');\nconst markdown = require('remark-parse');\nconst remarkGfm = require('remark-gfm');\nconst {\n  renumberFootnotes,\n} = require('@amanda-mitchell/remark-renumber-footnotes');\nconst html = require('remark-html');\n\nconst doc = `[^1]: Second\n\nThis is a document[^2] with[^2] a couple[^1] of footnotes[^foo].\n\n[^foo]: Last item\n\n[^2]:\tFirst\n`;\n\nconst processor = unified()\n\t.use(markdown)\n\t.use(remarkGfm)\n\t.use(renumberFootnotes)\n\t.use(html)\n\t.freeze();\n\nprocessor.process(doc).then({ contents } => console.log(contents))\n```\n\nWhen run, this script will print\n\n<!-- prettier-ignore-start -->\n```html\n<p>This is a document<sup><a href=\"#user-content-fn-1\" id=\"user-content-user-content-fnref-1\" data-footnote-ref aria-describedby=\"user-content-footnote-label\">1</a></sup> with<sup><a href=\"#user-content-fn-1\" id=\"user-content-user-content-fnref-1-2\" data-footnote-ref aria-describedby=\"user-content-footnote-label\">1</a></sup> a couple<sup><a href=\"#user-content-fn-2\" id=\"user-content-user-content-fnref-2\" data-footnote-ref aria-describedby=\"user-content-footnote-label\">2</a></sup> of footnotes<sup><a href=\"#user-content-fn-3\" id=\"user-content-user-content-fnref-3\" data-footnote-ref aria-describedby=\"user-content-footnote-label\">3</a></sup>.</p>\n<section data-footnotes class=\"footnotes\"><h2 class=\"sr-only\" id=\"user-content-footnote-label\">Footnotes</h2>\n<ol>\n<li id=\"user-content-user-content-fn-1\">\n<p>First <a href=\"#user-content-fnref-1\" data-footnote-backref=\"\" aria-label=\"Back to reference 1\" class=\"data-footnote-backref\">↩</a> <a href=\"#user-content-fnref-1-2\" data-footnote-backref=\"\" aria-label=\"Back to reference 1-2\" class=\"data-footnote-backref\">↩<sup>2</sup></a></p>\n</li>\n<li id=\"user-content-user-content-fn-2\">\n<p>Second <a href=\"#user-content-fnref-2\" data-footnote-backref=\"\" aria-label=\"Back to reference 2\" class=\"data-footnote-backref\">↩</a></p>\n</li>\n<li id=\"user-content-user-content-fn-3\">\n<p>Last item <a href=\"#user-content-fnref-3\" data-footnote-backref=\"\" aria-label=\"Back to reference 3\" class=\"data-footnote-backref\">↩</a></p>\n</li>\n</ol>\n</section>\n```\n<!-- prettier-ignore-end -->\n\n## Options\n\nBy default, this plugin will modify footnotes with non-numeric identifiers.\nIf you would like to disable this behavior you can pass\n\n<!-- prettier-ignore-start -->\n```js\n{ ignoreNonnumericFootnotes: true }\n```\n<!-- prettier-ignore-end -->\n\nAs the `options` for this plugin.\n","readmeFilename":"README.md"}