@argdown/remark-plugin

Turns Argdown code fences into svg argument maps

Usage no npm install needed!

<script type="module">
  import argdownRemarkPlugin from 'https://cdn.skypack.dev/@argdown/remark-plugin';
</script>

README

@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);