@amanda-mitchell/micromark-extension-footer

v3.0.0
A micromark extension that parses footer elements.
micromark micromark-extension footer container extension markdown unified

@amanda-mitchell/micromark-extension-footer

micromark extension to support a CommonMark proposal for footers.

This package provides the low-level modules for integrating with the micromark tokenizer and the micromark HTML compiler.

Installation

yarn add @amanda-mitchell/micromark-extension-footer

Usage

micromark can be configured to use this plugin by specifying its extensions and htmlExtensions options:

const micromark = require('micromark');

const syntax = require('@amanda-mitchell/micromark-extension-footer');
const html = require('@amanda-mitchell/micromark-extension-footer/html');

const document = `hello, world!

^^ a footer
`;

const renderedDocument = micromark(document, {
  extensions: [syntax()],
  htmlExtensions: [html()],
});

console.log(renderedDocument);

When run, this script will output

<p>hello, world!</p>
<footer>a footer</footer>
npm i @amanda-mitchell/micromark-extension-footer

Metadata

  • MIT
  • Whatever
  • Amanda Mitchell
  • released 2/26/2022

Downloads

Maintainers