open-index/open-npm huggingface dataset:
npm package: @markedts/markedit
Description: A markdown parser built for speed (fork from marked)
Author: 0xJWLabs
Latest version: 0.1.4

<a href="https://markedit.js.org">
  <img width="60px" height="60px" src="./img/logo-marked.svg" align="right" />
</a>

# MarkedIt

- ⚡ built for speed
- ⬇️ low-level compiler for parsing markdown without caching or blocking for long periods of time
- ⚖️ light-weight while implementing all markdown features from the supported flavors & specifications
- 🌐 works in a browser, on a server, or from a command line interface (CLI)

## Demo

Checkout the [demo page](https://markedit.js.org/demo/) to see markedit in action ⛹️

## Docs

Our [documentation pages](https://markedit.js.org) are also rendered using markedit 💯

Also read about:

* [Options](https://markedit.js.org/using_advanced)
* [Extensibility](https://markedit.js.org/using_pro)

## Compatibility

**Node.js:** Only [current and LTS](https://nodejs.org/en/about/releases/) Node.js versions are supported. End of life Node.js versions may become incompatible with MarkedIt at any point in time.

**Browser:** Not IE11 :)

## Installation

**CLI:**

```sh
npm install -g marked-it
```

**In-browser:**

```sh
npm install marked-it
```

## Usage

### Warning: 🚨 MarkedIt does not [sanitize](https://markedit.js.org/using_advanced#options) the output HTML. Please use a sanitize library, like [DOMPurify](https://github.com/cure53/DOMPurify) (recommended), [sanitize-html](https://github.com/apostrophecms/sanitize-html) or [insane](https://github.com/bevacqua/insane) on the *output* HTML! 🚨

```
DOMPurify.sanitize(markedit.parse(`<img src="x" onerror="alert('not happening')">`));
```

**CLI**

``` bash
# Example with stdin input
$ markedit -o hello.html
hello world
^D
$ cat hello.html
<p>hello world</p>
```

```bash
# Print all options
$ markedit --help
```

**Browser**

```html
<!doctype html>
<html>
<head>
  <meta charset="utf-8"/>
  <title>MarkedIt in the browser</title>
</head>
<body>
  <div id="content"></div>
  <script src="https://cdn.jsdelivr.net/npm/markedit/markedit.min.js"></script>
  <script>
    document.getElementById('content').innerHTML =
      markedit.parse('# MarkedIt in the browser\n\nRendered by **markedit**.');
  </script>
</body>
</html>
```
or import esm module

```html
<script type="module">
  import { markedit } from "https://cdn.jsdelivr.net/npm/markedit/lib/markedit.esm.js";
  document.getElementById('content').innerHTML =
    markedit.parse('# MarkedIt in the browser\n\nRendered by **markedit**.');
</script>
```

## License

Copyright (c) 2024, 0xJWLabs. (MIT License)