Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/thysultan/md.js
- Owner: thysultan
- License: mit
- Created: 2016-11-19T15:57:10.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-11-08T07:36:34.000Z (about 4 years ago)
- Last Synced: 2024-04-13T21:47:58.994Z (7 months ago)
- Topics: markdown
- Language: JavaScript
- Homepage:
- Size: 39.1 KB
- Stars: 28
- Watchers: 5
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
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)