{"name":"remark-footnotes","version":"1.0.0","description":"remark plugin to add support for pandoc footnotes","license":"MIT","keywords":["unified","remark","remark-plugin","plugin","mdast","markdown","footnote","note","definition","pandoc"],"repository":{"type":"git","url":"git+https://github.com/remarkjs/remark-footnotes.git"},"bugs":{"url":"https://github.com/remarkjs/remark-footnotes/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"dependencies":{},"devDependencies":{"nyc":"^15.0.0","prettier":"^2.0.0","rehype-format":"^3.0.1","rehype-stringify":"^6.0.0","remark-cli":"^7.0.0","remark-parse":"^7.0.0","remark-preset-wooorm":"^6.0.0","remark-rehype":"^6.0.0","remark-stringify":"^7.0.0","tape":"^4.0.0","to-vfile":"^6.0.0","unified":"^8.0.0","unist-builder":"^2.0.0","xo":"^0.28.0"},"scripts":{"format":"remark . -qfo && prettier --write \"**/*.js\" && xo --fix","test-api":"node test","test-coverage":"nyc --reporter lcov tape test/index.js","test":"npm run format && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"rules":{"complexity":"off","no-self-compare":"off","no-lonely-if":"off"}},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"5eb2291045ecf970fea14eb4313d21978b29c7bb","homepage":"https://github.com/remarkjs/remark-footnotes#readme","_id":"remark-footnotes@1.0.0","_nodeVersion":"13.10.1","_npmVersion":"6.14.3","dist":{"integrity":"sha512-X9Ncj4cj3/CIvLI2Z9IobHtVi8FVdUrdJkCNaL9kdX8ohfsi18DXHsCVd/A7ssARBdccdDb5ODnt62WuEWaM/g==","shasum":"9c7a97f9a89397858a50033373020b1ea2aad011","tarball":"http://registry-npm.ywwl.com/remark-footnotes/download/remark-footnotes-1.0.0.tgz","fileCount":4,"unpackedSize":20682,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJegKt7CRA9TVsSAnZWagAAvDUQAKDQQ0V9HpGPLV7n89hJ\nxV5atJgSGhGebDioqnxuNrgRmKbbQ+Kh82X49YZCJlqrWWLKnG+lV9UrK3Hp\nBpjhQn22LdHtdiwpN+mKuatWkO1ZMOcM+pkDm2Ex+8FA0yBcGSod3OyjKDNw\nnkAp9lp2ef7evIUuk7eQvMaNU0g3x6JbDyEAHL4K+M0cSfqGCCxk8jEP7Fkg\nocHtlwoaZn3G1XQMLXMYNrBrmICVqhduvgEs+lbOaEOS6XJsvJpCT8DnSgG9\nbudLoNVJU1HFxnWLwBjI9FysVRuhyfi5WowMli1XdN7X1Cv3xYliZGz+adQw\nl+UnlikvhV2ljagFo1ej+lrOBFHyf2o2+tMNRT9jjUnWlJ+2nOSC6GLo+HaS\nPlGKYQNBNghSXf/keASzDOURpuFhEltH8w8VcUw9kIbxloEEJzoh6WK1o1eQ\nz1kqbRcJYHOlgTksduUQ8h6cdiPsanI8siD7ikqvu5d6Ng9q5vbF60ziPpcG\nGnbTHLvdGnQy1nn92pLezb/fRki16OiNEA7A4HDnlYD/Bd3Lxj7vin9hy9+k\nKtsukyK8fgKJ5Xf68fPq3ZWZvBVl1VOzMyt5sjVQg/6k4jpySYEfBeQazmx+\nW2biiQV6weVf3DmOywDr0Q380FfndJj4LyXUj9LL2pJf4N9O9JGQBFvVOwuW\ni/zb\r\n=ly8I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG0Bo3u/w9exHoe3K/+g4V2VLY2TGizRjuyRZVkZEqfrAiB9fpTMkjCogY+2N19X7rEcXwC0G614dKVeIFueVDBW6g=="}],"size":6386,"noattachment":false,"key":"/remark-footnotes/-/remark-footnotes-1.0.0.tgz"},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remark-footnotes_1.0.0_1585490810839_0.30583860983323774"},"_hasShrinkwrap":false,"readme":"# remark-footnotes\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n[**remark**][remark] plugin to add support for footnotes.\n\n## Important!\n\nThis plugin is affected by the new parser in remark\n([`micromark`](https://github.com/micromark/micromark),\nsee [`remarkjs/remark#536`](https://github.com/remarkjs/remark/pull/536)).\nUse version 2 while you’re still on remark 12.\nUse version 3 for remark 13+.\n\n## Install\n\nThis package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c):\nNode 12+ is needed to use it and it must be `import`ed instead of `require`d.\n\n[npm][]:\n\n```sh\nnpm install remark-footnotes\n```\n\n## Use\n\nSay we have the following file, `example.md`:\n\n```markdown\nHere is a footnote reference,[^1]\nanother,[^longnote],\nand optionally there are inline\nnotes.^[you can type them inline, which may be easier, since you don’t\nhave to pick an identifier and move down to type the note.]\n\n[^1]: Here is the footnote.\n\n[^longnote]: Here’s one with multiple blocks.\n\n    Subsequent paragraphs are indented to show that they\nbelong to the previous footnote.\n\n        { some.code }\n\n    The whole paragraph can be indented, or just the first\n    line.  In this way, multi-paragraph footnotes work like\n    multi-paragraph list items.\n\nThis paragraph won’t be part of the note, because it\nisn’t indented.\n```\n\nAnd our module, `example.js`, looks as follows:\n\n```js\nimport {readSync} from 'to-vfile'\nimport {unified} from 'unified'\nimport remarkParse from 'remark-parse'\nimport remarkFootnotes from 'remark-footnotes'\nimport remarkRehype from 'remark-rehype'\nimport rehypeFormat from 'rehype-format'\nimport rehypeStringify from 'rehype-stringify'\n\nconst file = readSync('example.md')\n\nunified()\n  .use(remarkParse)\n  .use(remarkFootnotes, {inlineNotes: true})\n  .use(remarkRehype)\n  .use(rehypeFormat)\n  .use(rehypeStringify)\n  .process(file)\n  .then((file) => {\n    console.log(String(file))\n  })\n```\n\nNow, running `node example` yields:\n\n```html\n<p>\n  Here is a footnote reference,<a href=\"#fn1\" class=\"footnote-ref\" id=\"fnref1\" role=\"doc-noteref\"><sup>1</sup></a>\n  another,<a href=\"#fn2\" class=\"footnote-ref\" id=\"fnref2\" role=\"doc-noteref\"><sup>2</sup></a>,\n  and optionally there are inline\n  notes.<a href=\"#fn3\" class=\"footnote-ref\" id=\"fnref3\" role=\"doc-noteref\"><sup>3</sup></a>\n</p>\n<p>\n  This paragraph won’t be part of the note, because it\n  isn’t indented.\n</p>\n<section class=\"footnotes\" role=\"doc-endnotes\">\n  <hr>\n  <ol>\n    <li id=\"fn1\" role=\"doc-endnote\">\n      <p>Here is the footnote.<a href=\"#fnref1\" class=\"footnote-back\" role=\"doc-backlink\">↩</a></p>\n    </li>\n    <li id=\"fn2\" role=\"doc-endnote\">\n      <p>Here’s one with multiple blocks.</p>\n      <p>\n        Subsequent paragraphs are indented to show that they\n        belong to the previous footnote.\n      </p>\n      <pre><code>{ some.code }\n</code></pre>\n      <p>\n        The whole paragraph can be indented, or just the first\n        line. In this way, multi-paragraph footnotes work like\n        multi-paragraph list items.<a href=\"#fnref2\" class=\"footnote-back\" role=\"doc-backlink\">↩</a>\n      </p>\n    </li>\n    <li id=\"fn3\" role=\"doc-endnote\">\n      <p>\n        you can type them inline, which may be easier, since you don’t\n        have to pick an identifier and move down to type the note.<a href=\"#fnref3\" class=\"footnote-back\" role=\"doc-backlink\">↩</a>\n      </p>\n    </li>\n  </ol>\n</section>\n```\n\n## API\n\nThis package exports no identifiers.\nThe default export is `remarkFootnotes`.\n\n### `unified().use(remarkFootnotes[, options])`\n\nPlugin to add support for footnotes.\n\n###### `options.inlineNotes`\n\nWhether to support `^[inline notes]` (`boolean`, default: `false`).\nPassed to [`micromark-extension-footnote`][mm-footnote].\n\n###### Notes\n\n*   Labels, such as `[^this]` (in a footnote reference) or `[^this]:` (in a\n    footnote definition) work like link references\n*   Footnote definitions work like lists\n*   Image and link references cannot start with carets, so `![^this doesn’t\n    work][]`\n\n## Security\n\nUse of `remark-footnotes` does not involve [**rehype**][rehype]\n([**hast**][hast]) or user content so there are no openings for [cross-site\nscripting (XSS)][xss] attacks.\n\n## Related\n\n*   [`remark-gfm`](https://github.com/remarkjs/remark-gfm)\n    — GitHub Flavored Markdown\n*   [`remark-frontmatter`](https://github.com/remarkjs/remark-frontmatter)\n    — Frontmatter (YAML, TOML, and more)\n*   [`remark-math`](https://github.com/remarkjs/remark-math)\n    — Math\n*   [`remark-github`](https://github.com/remarkjs/remark-github)\n    — Auto-link references like in GitHub issues, PRs, and comments\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`remarkjs/.github`][health] for ways\nto get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/remarkjs/remark-footnotes/workflows/main/badge.svg\n\n[build]: https://github.com/remarkjs/remark-footnotes/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/remarkjs/remark-footnotes.svg\n\n[coverage]: https://codecov.io/github/remarkjs/remark-footnotes\n\n[downloads-badge]: https://img.shields.io/npm/dm/remark-footnotes.svg\n\n[downloads]: https://www.npmjs.com/package/remark-footnotes\n\n[size-badge]: https://img.shields.io/bundlephobia/minzip/remark-footnotes.svg\n\n[size]: https://bundlephobia.com/result?p=remark-footnotes\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/remarkjs/remark/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[health]: https://github.com/remarkjs/.github\n\n[contributing]: https://github.com/remarkjs/.github/blob/HEAD/contributing.md\n\n[support]: https://github.com/remarkjs/.github/blob/HEAD/support.md\n\n[coc]: https://github.com/remarkjs/.github/blob/HEAD/code-of-conduct.md\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[remark]: https://github.com/remarkjs/remark\n\n[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting\n\n[rehype]: https://github.com/rehypejs/rehype\n\n[hast]: https://github.com/syntax-tree/hast\n\n[mm-footnote]: https://github.com/micromark/micromark-extension-footnote#optionsinlinenotes\n","publish_time":1585490810990,"_cnpm_publish_time":1585490810990,"dist-tags":{"latest":"5.0.0"}}