1.7.7 • Published 3 years ago

@argdown/remark-plugin v1.7.7

Weekly downloads
11
License
MIT
Repository
github
Last release
3 years ago

@argdown/marked-plugin

Argdown logo

This package is part of the Argdown project and adds Argdown support to the marked Markdown parser.

For a more detailed documentation, read the guide on how to use Argdown in Markdown.

Here are the basics from it:

How to add Argdown support to Marked

Install marked and @argdown/marked-plugin in your package:

npm install marked @argdown/marked-plugin

Configure the marked instance:

import marked from "marked";
import { addArgdownSupportToMarked } from "../src/argdown-marked-plugin";

const markedWithArgdown = addArgdownSupportToMarked(
  marked,
  new marked.Renderer(),
  {}
);
const markdownInput = `
# Argdown in Markdown

\`\`\`argdown
[s]
    <- <a>
\`\`\`
`;
const htmlOutput = markedWithArgdown(markdownInput);
console.log(htmlOutput);