# markdown2html-pro

> A parser of Markdown and a render to html

Latest version **1.0.6** (published 2020-02-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install markdown2html-pro
pnpm add markdown2html-pro
yarn add markdown2html-pro
bun add markdown2html-pro
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2020-02-19 |
| First published | 2017-09-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 17 |
| Unpacked size | 35 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Haixin Chen |
| Maintainers | searking |
| Keywords | markdown, html, markdown-it |

## Links

- npm: https://www.npmjs.com/package/markdown2html-pro
- Repository: https://github.com/searKing/markdown2html-pro
- Homepage: https://github.com/searKing/markdown2html-pro/blob/master/README.md
- Issues: https://github.com/searKing/markdown2html-pro/issues
- npm.io page: https://npm.io/package/markdown2html-pro

## Dependencies (17)

- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [markdown-it](https://npm.io/package/markdown-it.md) ^10.0.0
- [markdown-it-ins](https://npm.io/package/markdown-it-ins.md) ^3.0.0
- [markdown-it-sub](https://npm.io/package/markdown-it-sub.md) ^1.0.0
- [markdown-it-sup](https://npm.io/package/markdown-it-sup.md) ^1.0.0
- [markdown-it-abbr](https://npm.io/package/markdown-it-abbr.md) ^1.0.4
- [markdown-it-mark](https://npm.io/package/markdown-it-mark.md) ^3.0.0
- [markdown-it-attrs](https://npm.io/package/markdown-it-attrs.md) ^3.0.2
- [markdown-it-emoji](https://npm.io/package/markdown-it-emoji.md) ^1.4.0
- [markdown-it-anchor](https://npm.io/package/markdown-it-anchor.md) ^5.2.5
- [markdown-it-deflist](https://npm.io/package/markdown-it-deflist.md) ^2.0.3
- [markdown-it-footnote](https://npm.io/package/markdown-it-footnote.md) ^3.0.1
- [markdown-it-task-lists](https://npm.io/package/markdown-it-task-lists.md) ^2.1.0
- [markdown-it-expand-tabs](https://npm.io/package/markdown-it-expand-tabs.md) ^1.0.12
- [markdown-it-highlightjs](https://npm.io/package/markdown-it-highlightjs.md) ^3.0.0
- [markdown-it-mermaid-pro](https://npm.io/package/markdown-it-mermaid-pro.md) ^2.2.4
- [markdown-it-lazy-headers](https://npm.io/package/markdown-it-lazy-headers.md) ^0.1.3

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2020-02-19
- 1.0.5 — 2017-11-05
- 1.0.4 — 2017-11-05
- 1.0.3 — 2017-10-27
- 1.0.2 — 2017-10-27
- 1.0.1 — 2017-10-27
- 1.0.0 — 2017-10-27
- 0.0.6 — 2017-09-27
- 0.0.5 — 2017-09-25

## README

# markdown2html-pro
## GitHub Status
[![Build Status](https://travis-ci.org/searKing/markdown2html-pro.svg?branch=master)](https://travis-ci.org/searKing/markdown2html-pro.svg?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/searKing/markdown2html-pro/badge.svg?branch=master)](https://coveralls.io/github/searKing/markdown2html-pro?branch=master)
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)

## NPM Status
[![Build Status](https://travis-ci.org/npm/markdown2html-pro.svg?branch=master)](https://travis-ci.org/npm/markdown2html-pro)
[![Code Climate](https://codeclimate.com/github/npm/markdown2html-pro/badges/gpa.svg)](https://codeclimate.com/github/npm/markdown2html-pro)
[![Dependency Status](https://david-dm.org/npm/markdown2html-pro.svg)](https://david-dm.org/npm/markdown2html-pro)
[![Issue Stats](http://issuestats.com/github/npm/markdown2html-pro/badge/pr)](http://issuestats.com/github/npm/markdown2html-pro)
[![Issue Stats](http://issuestats.com/github/npm/markdown2html-pro/badge/issue)](http://issuestats.com/github/npm/markdown2html-pro)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)

A parser of Markdown and a render to html, written in typescript, that aims for [preview-code](https://github.com/searKing/preview-vscode) , which is published as an extension on Visual Studio Code to preview Markdown, ReStructured Text, HTML, Jade, Pug or Mermaid files, Image's URI or CSS while editing them in VSCode.

It is built on top of [`markdown-it`],
a [CommonMark] markdown parser. You can use markdown2html-pro:

`markdown2html-pro` is the thing that parses package READMEs on
http://www.npmjs.com. If you see a markdown parsing bug there,
[file an issue here]!

[file an issue here]: https://github.com/searKing/markdown2html-pro/issues
[GitHub-style markdown]: https://help.github.com/articles/basic-writing-and-formatting-syntax/
[CommonMark]: http://spec.commonmark.org/
[`markdown-it`]: https://github.com/markdown-it/markdown-it
[programmatically in NodeJS]: #Using this module in other modules

# README

An extension to preview Markdown, ReStructured Text, HTML, Jade, Pug or Mermaid files, Image's URI or CSS while editing them in VSCode

# Installation

```sh
npm install markdown2html-pro --save
```

# Using this module in other modules

Here is a quick example of how this module can be used in other modules. The [TypeScript Module Resolution Logic](https://www.typescriptlang.org/docs/handbook/module-resolution.html) makes it quite easy. The file `src/index.ts` is a [barrel](https://basarat.gitbooks.io/typescript/content/docs/tips/barrel.html) that re-exports selected exports from other files. The _package.json_ file contains `main` attribute that points to the generated `lib/index.js` file and `typings` attribute that points to the generated `lib/index.d.ts` file.

> If you are planning to have code in multiple files (which is quite natural for a NodeJS module) that users can import, make sure you update `src/index.ts` file appropriately.

Now assuming you have published this amazing module to _npm_ with the name `markdown2html-pro`, and installed it in the module in which you need it -

- To use the `Markdown2HtmlPro` class in a TypeScript file -

```ts
import { Markdown2HtmlPro } from "markdown2html-pro";
const markdownContent = "";
const markdown2htmlPro = new Markdown2HtmlPro();
markdown2htmlPro.markdown2html(markdownContent);
```

- To use the `Markdown2HtmlPro` class in a JavaScript file -

```js
const Markdown2HtmlPro = require('markdown2html-pro').Markdown2HtmlPro;
const markdownContent = "";

const markdown2htmlPro = new Markdown2HtmlPro();
markdown2htmlPro.markdown2html(markdownContent);
```

## Setting travis and coveralls badges
1. Sign in to [travis](https://travis-ci.org/) and activate the build for your project.
2. Sign in to [coveralls](https://coveralls.io/) and activate the build for your project.
3. Replace searKing/markdown2html-pro with your repo details like: "ospatil/generator-node-typescript".


## Programmatic Usage

markdown2html-pro exports a single function. For basic use, that function
takes a single argument: a string to convert.

```js
var marky = require("markdown2html-pro")
var html = marky("# hello, I'm markdown")
```

## Tests

```sh
npm install
npm test
```

## Thanks to

+ [marky-markdown](https://github.com/npm/marky-markdown).

---
_Source: https://npm.io/package/markdown2html-pro · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
