1.0.3 • Published 2 years ago

markdown-html-transformer v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Markdown-HTML Transformer

npm version license

A simple npm package that transforms Markdown content into HTML using the Markdown-It library.

Installation

npm install markdown-html-transformer

Usage

const MarkdownTransformer = require('markdown-html-transformer');

const markdownContent = `
# Hello, World!

This is **bold** and *italic* text.

- Item 1
- Item 2
- Item 3
`;

const htmlContent = MarkdownTransformer.convertMarkdownToHTML(markdownContent);

console.log(htmlContent);

Output

<h1>Hello, World!</h1>
<p>This is <strong>bold</strong> and <em>italic</em> text.</p>
<ul>
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
</ul>

API

convertMarkdownToHTML(markdownContent) This function takes a string markdownContent as input and converts it into HTML using the Markdown-It library. It returns the generated HTML content as a string.

  • markdownContent: The Markdown content to be transformed into HTML.

License

This project is licensed under the MIT License.

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago