markdown-to-html-renderer
v1.2.2
Published
A simple library to convert Markdown to sanitized HTML with syntax highlighting.
Downloads
11
Maintainers
Readme
markdown-to-html-renderer
A simple library to render Markdown content to HTML using Node.js.
Installation
npm install markdown-to-html-renderer
Usage
const markdownToHtml = require('markdown-to-html-renderer');
const markdownContent = `
# Hello, World!
This is a **Markdown** example.
- List item 1
- List item 2
`;
const htmlContent = markdownToHtml(markdownContent);
console.log(htmlContent);
Options
This library utilizes marked for Markdown parsing, dompurify for HTML sanitization, and highlight.js for code syntax highlighting.
License
This project is licensed under the MIT License - see the LICENSE file for details.