Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thysultan/md.js

small markdown parser
https://github.com/thysultan/md.js

markdown

Last synced: 7 days ago
JSON representation

small markdown parser

Awesome Lists containing this project

README

        

# MD.js

- ~1kb minified+gzipped
- ~1.5kb minified

[![npm](https://img.shields.io/npm/v/md.js.svg?style=flat)](https://www.npmjs.com/package/md.js) [![licence](https://img.shields.io/badge/licence-MIT-blue.svg?style=flat)](https://github.com/thysultan/md.js/blob/master/LICENSE.md)

MD is a lightweight markdown parser with default support for langauge specific code blocks and XSS filtering, for example

```javascript
// replace . with `
```javascript
var int = 0;
```
```

will output the following

```html



var int = 0;

```

XSS attempt `alert(1);` will be converted to `<script>alert(1)</script>`
while `` will be converted to ``
and `` inline events will be remove and more.

## Browser Support

* Edge
* IE 8+
* Chrome
* Firefox
* Safari

# Installation

#### direct download

```html

```

#### CDN

```html

```

#### npm

```
npm install md.js --save
```

#### Useage

```javascript
md('# Heading...');
```

# Examples

[demo](https://rawgit.com/thysultan/md.js/master/examples/index.html)