npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@fsegurai/marked-extended-footnote

v15.0.0

Published

Extended Footnote for Marked.js

Downloads

73

Readme

A library of extended footnotes for Marked.js.

@fsegurai/marked-extended-footnote is an extensions for Marked.js that adds support for extended footnotes.

Table of contents

Installation

@fsegurai/marked-extended-footnote

To add @fsegurai/marked-extended-footnote along with Marked.js to your package.json use the following commands.

npm install @fsegurai/marked-extended-footnote marked@^15.0.0 --save

Using Extended Footnotes

Import @fsegurai/marked-extended-footnote and apply it to your Marked instance as shown below.

import { marked } from 'marked'
import markedExtendedFootnote from '@fsegurai/marked-extended-footnote'

// or UMD script
// <script src="https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js"></script>
// <script src="https://cdn.jsdelivr.net/npm/@fsegurai/marked-extended-footnote/lib/index.umd.js"></script>

marked.use(markedExtendedFootnote())

const exampleMarkdown = `
This is an inline footnote reference[^1].

[^1]: This is the footnote.

This is a block footnote reference[^2].

[^2]:
    This is the block footnote.
    It can contain multiple lines.
`

marked.parse(exampleMarkdown)

// Output:
// <p>This is an inline footnote reference<sup id="fnref:1"><a href="#fn:1" class="footnote-ref">1</a></sup>.</p>

// <p>This is a block footnote reference<sup id="fnref:2"><a href="#fn:2" class="footnote-ref">2</a></sup>.</p>

// <div class="footnotes">
//   <hr>
//   <ol>
//     <li id="fn:1">
//       <p>This is the footnote. <a href="#fnref:1" class="footnote-backref">↩</a></p>
//     </li>
//     <li id="fn:2">
//       <p>This is the block footnote. It can contain multiple lines. <a href="#fnref:2" class="footnote-backref">↩</a></p>
//     </li>
//   </ol>
// </div>
By default, this plugin does not place footnote markers in square brackets ([1]), instead like this: 1. 
So you will need to add the style as shown below to your CSS:
/* Marked Extended Footnotes to style links references */
[data-fnref-ref]::before {
  content: '[';
}

[data-fnref-ref]::after {
  content: ']';
}

Read the Marked.js documentation for more details about its usage.

Options

The marked-footnote extension accepts the following configuration options:

  • prefixId: The prefix ID for footnotes. Defaults to 'fnref-'.
  • description: The description of footnotes, used by aria-labeledby attribute. Defaults to 'Footnotes'.
  • refMarkers: If set to true, it will place footnote reference in square brackets, like this: [1]. Defaults to false.

Available Extensions

Demo Application

To see all themes in action, check out the demo: https://fsegurai.github.io/marked-extensions.

To set up the demo locally:

git clone https://github.com/fsegurai/marked-extensions.git
npm install
npm start

This will serve the application locally at http://[::1]:8000.

License

Licensed under MIT.