close
Skip to main content

@sys/markdown@0.0.17
Built and signed on GitHub Actions

Works with
This package works with Deno, Browsers
This package works with Deno
This package works with Browsers
JSR Score100%
License
MIT
Downloads38/wk
Published2 weeks ago (0.0.17)

Markdown parsing and serialization primitives.

Markdown

Markdown parsing, serialization, frontmatter, and safe rendering primitives.

Usage

import { Markdown } from '@sys/markdown';

const parsed = Markdown.parse('# Hello');
if (parsed.error) throw parsed.error;

const doc = Markdown.Frontmatter.parse('---\ntitle: Hello\n---\n# Hello');
if (doc.error) throw doc.error;

const rendered = Markdown.Html.render(doc.data.ast);
if (rendered.error) throw rendered.error;

const ast = parsed.data;
const meta = doc.data.frontmatter?.data;
const html = rendered.data;
Built and signed on
GitHub Actions

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@sys/markdown

Import symbol

import * as markdown from "@sys/markdown";
or

Import directly with a jsr specifier

import * as markdown from "jsr:@sys/markdown";