1.0.0 • Published 12 months ago
@oncehub/markdown-safe v1.0.0
markdown-safe
Thin wrapper for markdown parsing and output sanitization
Installation
To install this module, run the following command:
$ npm install --save @oncehub/markdown-safeUsage
import { renderMarkdown } from "@oncehub/markdown-safe";
const markdown = `
# This is a heading
This is some **bold** text, and here's a [link](https://example.com).
`;
const safeHtml = renderMarkdown(markdown);
// Now you can use 'safeHtml' (e.g., set it as the innerHTML of an element)
console.log(safeHtml);Development
Tests
Run tests via npm test.
Deployment
Package is automatically published to npm when creating a new release on Github. Check out the release section in the repo. Read more about releases here.
License
This module is licensed under the MIT License. See the LICENSE file for details.
1.0.0
12 months ago