mdast-util-lemmy-spoiler
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

mdast-util-lemmy-spoiler

What is this?

This package contains two extensions that add support for lemmy spoiler syntax in markdown to mdast. These extensions plug into mdast-util-from-markdown (to support parsing spoilers in markdown into a syntax tree) and mdast-util-to-markdown (to support serializing spoilers in syntax trees to markdown).

Install

This package is ESM only. In Node.js (version 16+), install with npm:

npm install mdast-util-lemmy-spoiler

In Deno with esm.sh:

import {spoilerFromMarkdown} from 'https://esm.sh/mdast-util-lemmy-spoiler@1'

In browsers with esm.sh:

<script type="module">
  import {spoilerFromMarkdown} from 'https://esm.sh/mdast-util-lemmy-spoiler@3?bundle'
</script>

Package Sidebar

Install

npm i mdast-util-lemmy-spoiler

Weekly Downloads

148

Version

2.0.0

License

AGPL-3.0-only

Unpacked Size

7.82 kB

Total Files

8

Last publish

Collaborators

  • aeharding