@yozora/html-footnote-reference
TypeScript icon, indicating that this package has built-in type declarations

2.0.0-alpha.2 • Public • Published

@yozora/html-footnote-reference


This component is for rendering the Yozora Markdown AST node IFootnoteReference produced by @yozora/tokenizer-footnote-reference into HTML string.

This component has been built into [@yozora/html-markdown][], you can use it directly.

Install

  • npm

    npm install --save @yozora/html-footnote-reference
  • yarn

    yarn add @yozora/html-footnote-reference

Usage

  • Basic:

    import type { IFootnoteReference } from '@yozora/ast'
    import renderFootnoteReference from '@yozora/html-footnote-reference'
    
    const node: IFootnoteReference = {
      type: 'footnoteReference',
      identifier: 'bravo',
      label: 'bravo',
    }
    renderFootnoteReference(node)
    // => <sup id="reference-bravo" class="yozora-footnote-reference"><a href="#bravo" title="bravo">[bravo]</a></sup>

Related

Package Sidebar

Install

npm i @yozora/html-footnote-reference

Weekly Downloads

2

Version

2.0.0-alpha.2

License

MIT

Unpacked Size

7.44 kB

Total Files

6

Last publish

Collaborators

  • lemonclown