Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@yozora/html-footnote-definition

guanghechen23MIT2.0.0-alpha.2TypeScript support: included

render Yozora Markdown AST node IFootnoteReference into HTML string

mdast to html, yozora, footnote reference

readme

@yozora/html-footnote-definition


This component is for rendering the Yozora Markdown AST node IFootnoteDefinition produced by [@yozora/tokenizer-footnote-definition][] 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-definition
  • yarn

    yarn add @yozora/html-footnote-definition

Usage

  • Basic:

    import type { IFootnoteDefinition } from '@yozora/ast'
    import renderFootnoteDefinitions from '@yozora/html-footnote-definition'
    
    const nodes: IFootnoteDefinition[] = [
        {
          type: 'footnoteDefinition',
          identifier: 'bravo',
          label: 'Bravo',
          children: [
            {
              type: 'text',
              value: 'bravo and charlie.',
            } as IText,
          ],
        },
      ]
    renderFootnoteReference({ nodes }, rendererChildren)
    // => <div class="yozora-footnote-definition">
    //      <div class="yozora-footnote-definition__title">footnote-definition</div>
    //      <ul class="yozora-footnote-definition__main">
    //        <li id=bravo class="yozora-footnote-definition__item">
    //          <p class="yozora-footnote-definition__item-title yozora-paragraph">
    //            <a href=#reference-bravo>&uarr;</a>
    //              <span>Bravo</span>
    //          </p>
    //          <div class="yozora-footnote-definition__item-content">
    //            <span class="yozora-text">bravo and charlie.</span>
    //          </div>
    //        </li>
    //      </ul>
    //    </div>

changelog

Changelog

2.0.0-alpha.1 (2022-01-13)

Changed

  • 👽 fix: fix type errors due to the upgrade of @yozora/ast [5a7f4e4]
  • ⬆️ chore: upgrade dependencies [61ec568]

Miscellaneous

  • 📝 docs: update CHANGELOG [7c09d60]

2.0.0-alpha.0 (2022-01-05)

Added

  • ✅ fix: fix test errors [d2edbce]
  • ✨ feat: add new sub-package @yozora/html-footnote-definition [00d1926]
  • ✨ feat: add new sub package @yozora/html-footnote-reference [0892ded]

Changed

  • 🎨 mod: render footnote-definitions [9c1c157]
  • 👽 fix: fix type errors [f0dbe94]
  • ⬆️ chore: upgrade dependencies [c04aa51]

Miscellaneous

  • 📝 docs: update CHANGELOG [08b338b]

1.0.0-alpha.4 (2021-09-13)

Changed

  • ⬆️ chore: upgrade dependencies [cbe1311]

Miscellaneous

  • feat(markdown): use styles bundle from yozora-react [fbb7080]
  • feat(image): keep consistent with yozora-react [86dae9f]
  • feat(admonition): keep consistent with yozora-react [5b60ca4]
  • 📝 docs: update CHANGELOG [bb9eb60]

1.0.0-alpha.3 (2021-08-23)

Changed

  • ⬆️ chore: ugprade devDependencies [271bc2d]

Miscellaneous

  • 📝 docs: update CHANGELOG [f3f4f2e]

1.0.0-alpha.2 (2021-08-02)

Changed

  • ⬆️ chore: upgrade dependencies [cea72bb]
  • ⬆️ chore: upgrade dev dependencies [07ec57d]

Miscellaneous

  • feat: fix missing rederer (ecmaImport) warning [7e63b50]
  • 📝 docs: add CHANGELOG [886b00b]

1.0.0-alpha.1 (2021-06-07)

Changed

  • 🔧 chore(html-markdown): fix incorrect versions of dependencies [e31416d]

1.0.0-alpha.0 (2021-06-07)

Added

  • ✅ fix: test script running failed [0ea96aa]
  • ✨ feat: implemented new sub-package @yozora/html-markdown [33f8c6c]
  • ✨ feat: implemented new sub-package @yozora/html-code [9886c64]
  • ✨ feat: implemented new sub-package @yozora/html-admonition [bfaaf57]
  • ✨ feat: implemented new sub-package @yozora/html-math [20eaca3]
  • ✨ feat: implemented new sub-package @yozora/html-inline-math [71b5a52]
  • ✨ feat: implemented new sub-package @yozora/html-table [10c731c]
  • ✨ feat: implemented new sub-package @yozora/html-list [2a8a4f9]
  • ✨ feat: implemented new sub-package @yozora/html-image [ed03932]
  • ✨ feat: implemented new sub-package @yozora/html-link [25ba08a]
  • ✨ feat: implemented new sub-package @yozora/html-inline-code [b04a270]
  • ✨ feat: implemented new sub-package @yozora/html-heading [8872058]
  • ✨ feat: implemented new sub-package @yozora/html-blockquote [08d2e36]
  • ✨ feat: implemented new sub-package @yozora/html-paragraph [5b76810]
  • ✨ feat: implemented new sub-package @yozora/html-break [e5b91b7]
  • ✅ test: update snapshots & update READMEs [0d592b7]
  • ✨ feat: implemented new sub-package @yozora/html-delete [a101c7a]
  • ✨ feat: implemented new sub-package @yozora/html-emphasis [00aa7b7]
  • ✨ feat: implemented new sub-package @yozora/html-strong [91148fd]
  • ✨ feat: implemented new sub-package @yozora/html-thematic-break [2b88a38]
  • ✨ feat: implemented new sub-package @yozora/html-text [9f4a295]
  • 🎉 initialize [8f0d2cc]

Changed

  • 🔧 chore: remove unnecessary peerDependencies [fe0daeb]
  • 🔧 chore: fix incorrect import [4e8e695]
  • 🔧 chore: add husky hook [33fe6a9]
  • 🔧 chore: update lint config [914d7a8]
  • 🔧 chore: add dependencies and configurations [c32c2c9]

Fixed

  • 🐛 fix(heading): the anchor element was incorrectly rendered [9b43a40]

Security

  • 🔒 improve: perform santizing for HTML contents [a206675]

Miscellaneous

  • 🚧 improve: add styles [7881c4a]
  • 📝 docs: update READMEs [7b10942]
  • 📝 docs: update READMEs [c7ecb69]
  • 🔨 chore: update bundle entry & add missing dev dependencies [cda5f88]
  • 📝 docs: update snapshot and READMEs [cb908a2]
  • 🔨 chore: add github action to run ci [66d4211]