# markdown-into-html

> Transform Markdown to HTML from file or URL

Latest version **1.0.3** (published 2019-06-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install markdown-into-html
pnpm add markdown-into-html
yarn add markdown-into-html
bun add markdown-into-html
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2019-06-09 |
| First published | 2018-10-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 14 KB |
| Known vulnerabilities | 0 (+6 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Mateusz Janusz |
| Maintainers | mateuszjanusz |
| Keywords | markdown, html, mardown to html, markdown-to-html, markdown-into-html |

## Links

- npm: https://www.npmjs.com/package/markdown-into-html
- Repository: https://github.com/mateuszjanusz/markdown-into-html
- Homepage: https://github.com/mateuszjanusz/markdown-into-html#readme
- Issues: https://github.com/mateuszjanusz/markdown-into-html/issues
- npm.io page: https://npm.io/package/markdown-into-html

## Dependencies (11)

- [request](https://npm.io/package/request.md) ^2.88.0
- [markdown-it](https://npm.io/package/markdown-it.md) ^8.4.2
- [markdown-it-ins](https://npm.io/package/markdown-it-ins.md) ^2.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) ^2.0.0
- [markdown-it-emoji](https://npm.io/package/markdown-it-emoji.md) ^1.4.0
- [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.1

## 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.3 (latest) — 2019-06-09
- 1.0.1 — 2018-10-05
- 1.0.0 — 2018-10-05

## README

# markdown-into-html

[![](https://img.shields.io/npm/v/markdown-into-html.svg)]()
[![](https://img.shields.io/npm/dt/markdown-into-html.svg)]()
> Transform Markdown to HTML


## Features

-   Transforms local files and files from URL
-   Uses [markdown-it](https://github.com/markdown-it/markdown-it) to convert from Markdown to HTML
-   Configurable, check list of [options](#Options)
-   Supports:
    -   tables
    -   HTML tags
    -   links
    -   emojis
    -   task lists
    -   footnotes
    -   abbreviations
    -   definition lists
    -   `<ins>` tags
    -   superscripts
    -   subscripts
    -   qoutes, styling and more

## Installation

With yarn:

```
yarn add markdown-to-html
```

With npm:

```
npm install markdown-to-html
```

## Usage

```javascript
const markdownIntoHtml = require('markdown-into-html')

// Local file
const html_code = await markdownIntoHtml({
    path: './myMarkdownFile.md',
})

// URL source
const html_code = await markdownIntoHtml({
    url: 'https://raw.githubusercontent.com/mateuszjanusz/markdown-into-html/master/README.md',
})

// Using options:
const html_code = await markdownIntoHtml({
    path: './myMarkdownFile.md',
    options: {
        emoji: false, // disabling emojis
    },
})
```

## Properties

| Prop                | Type   | Description                                                    |
| ------------------- | ------ | -------------------------------------------------------------- |
| path                | String | The location of a file to transform                            |
| url                 | String | The URL source of a file to transform                          |
| [options](#Options) | Object | Rules and options, check the table below for available options |

## Options

By default all rules are enabled, but can be restricted by options.

| Option      | Type    | Default     | Describe                                                                                                     |
| ----------- | ------- | ----------- | ------------------------------------------------------------------------------------------------------------ |
| html        | Boolean | `true`      | Enable HTML tags in source                                                                                   |
| xhtmlOut    | Boolean | `true`      | Close single tags with '/' (e.g. `<br />`)                                                                   |
| breaks      | Boolean | `true`      | Autoconvert '\n' in paragraphs to `<br>`                                                                     |
| linkify     | Boolean | `true`      | Autoconvert URL-like text to link                                                                            |
| emoji       | Boolean | `true`      | Enable Emoji syntax plugin and support emoticons shortcuts                                                   |
| typographer | Boolean | `true`      | Enable some language-neutral replacement and quotes beautification                                           |
| langPrefix  | String  | `language-` | CSS language prefix for fenced blocks                                                                        |
| quotes      | String  | `“”‘’`      | Double + single quotes replacement pairs, e.g. use `«»„“` for Russian, `“”‘’` for Chinese, `„“‚‘` for German |
| taskLists   | Boolean | `true`      | enable task/todo lists with items starting with [ ] or [x]                                                   |

## License

MIT

## References

-   [markdown-it](https://github.com/markdown-it/markdown-it)

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