2.0.0 • Published 10 months ago

@lowlighter/markdown v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

🖨️ Markdown

JSR JSR Score NPM Coverage

📑 Examples

Rendering markdown

// Render markdown using the default renderer
import { Renderer } from "./renderer.ts"
await Renderer.render("# Hello, world!")

// Render markdown using a custom renderer
import { gfm, highlighting, markers, math, sanitize, wikilinks } from "./plugins/mod.ts"
const renderer = new Renderer({ plugins: [gfm, highlighting, math, markers, wikilinks, sanitize] })
await renderer.render("# Hello, world!")

Creating a custom renderer with different plugins sources

import { Renderer } from "./renderer.ts"
import frontmatter from "./plugins/frontmatter.ts"

const renderer = await Renderer.with({
  plugins: [
    // You can specify an existing Plugin object...
    frontmatter,
    // ...or a a HTTPS import that points towards a compatible Plugin object!
    // Warning: this is not possible if you are using the JSR package version
    //          https://github.com/denoland/deno/pull/22623
    "https://esm.sh/jsr/@libs/markdown/plugins/gfm",
  ],
})
await renderer.render("# foo")

✨ Features

📜 Licenses and credits

Copyright (c) Simon Lecoq <@lowlighter>. (MIT License)
https://github.com/lowlighter/libs/blob/main/LICENSE

This library rely on the awesome unified ecosystem.

2.0.0

10 months ago

1.2.3

10 months ago

1.2.2

10 months ago

1.2.1

10 months ago

1.2.0

10 months ago

1.1.0

10 months ago

1.0.0

10 months ago